# HG changeset patch # User Goffi # Date 1652703601 -7200 # Node ID e2a1ac1afb38eb2b7821e88c2cf38306461e9a52 # Parent 2c187445a3d33ee79c068f28fa3dc490a8c257ea plugin invitation: use `store` hint to be sure that the invitation is archived diff -r 2c187445a3d3 -r e2a1ac1afb38 sat/plugins/plugin_exp_invitation.py --- 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