Skip to content
Snippets Groups Projects
Commit aebb5116 authored by inso's avatar inso
Browse files

Fix membership publishing

parent 6f353796
Branches
Tags
No related merge requests found
...@@ -106,13 +106,12 @@ class InformationsController(QObject): ...@@ -106,13 +106,12 @@ class InformationsController(QObject):
@asyncify @asyncify
async def send_join_demand(self, checked=False): async def send_join_demand(self, checked=False):
connection = await self.view.ask_for_connection(self.model.connections_with_uids()) if not self.model.connection:
if not connection:
return return
secret_key, password = await PasswordInputController.open_dialog(self, connection) secret_key, password = await PasswordInputController.open_dialog(self, self.model.connection)
if not password or not secret_key: if not password or not secret_key:
return return
result = await self.model.send_join(connection, secret_key, password) result = await self.model.send_join(secret_key, password)
if result[0]: if result[0]:
if self.model.notifications(): if self.model.notifications():
toast.display(self.tr("Membership"), self.tr("Success sending Membership demand")) toast.display(self.tr("Membership"), self.tr("Success sending Membership demand"))
......
...@@ -171,3 +171,9 @@ class InformationsModel(QObject): ...@@ -171,3 +171,9 @@ class InformationsModel(QObject):
:return: the community in short currency format :return: the community in short currency format
""" """
return shortened(self.connection.currency) return shortened(self.connection.currency)
def notifications(self):
return self.app.parameters.notifications
async def send_join(self, secret_key, password):
return await self.app.documents_service.send_membership(self.connection, secret_key, password, "IN")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment