Mercurial > libervia-backend
changeset 3781:e2a1ac1afb38
plugin invitation: use `store` hint to be sure that the invitation is archived
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 16 May 2022 14:20:01 +0200 |
parents | 2c187445a3d3 |
children | 580df5b557be |
files | sat/plugins/plugin_exp_invitation.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/plugins/plugin_exp_invitation.py Mon May 16 13:03:53 2022 +0200 +++ b/sat/plugins/plugin_exp_invitation.py Mon May 16 14:20:01 2022 +0200 @@ -37,7 +37,7 @@ C.PI_IMPORT_NAME: "INVITATION", C.PI_TYPE: "EXP", C.PI_PROTOCOLS: [], - C.PI_DEPENDENCIES: ["XEP-0060", "XEP-0329", "LIST_INTEREST"], + C.PI_DEPENDENCIES: ["XEP-0060", "XEP-0329", "XEP-0334", "LIST_INTEREST"], C.PI_RECOMMENDATIONS: ["EMAIL_INVITATION"], C.PI_MAIN: "Invitation", C.PI_HANDLER: "yes", @@ -57,6 +57,7 @@ log.info(_("Invitation plugin initialization")) self.host = host self._p = self.host.plugins["XEP-0060"] + self._h = self.host.plugins["XEP-0334"] # map from namespace of the invitation to callback handling it self._ns_cb = {} @@ -113,6 +114,7 @@ "extra": {}, } client.generateMessageXML(mess_data) + self._h.addHintElements(mess_data["xml"], [self._h.HINT_STORE]) invitation_elt = mess_data["xml"].addElement("invitation", NS_INVITATION) if name is not None: invitation_elt["name"] = name