plugin invitation: use store hint to be sure that the invitation is archived
This commit is contained in:
parent
8946b6fb4e
commit
85911b33d4
1 changed files with 3 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ PLUGIN_INFO = {
|
||||||
C.PI_IMPORT_NAME: "INVITATION",
|
C.PI_IMPORT_NAME: "INVITATION",
|
||||||
C.PI_TYPE: "EXP",
|
C.PI_TYPE: "EXP",
|
||||||
C.PI_PROTOCOLS: [],
|
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_RECOMMENDATIONS: ["EMAIL_INVITATION"],
|
||||||
C.PI_MAIN: "Invitation",
|
C.PI_MAIN: "Invitation",
|
||||||
C.PI_HANDLER: "yes",
|
C.PI_HANDLER: "yes",
|
||||||
|
|
@ -57,6 +57,7 @@ class Invitation(object):
|
||||||
log.info(_("Invitation plugin initialization"))
|
log.info(_("Invitation plugin initialization"))
|
||||||
self.host = host
|
self.host = host
|
||||||
self._p = self.host.plugins["XEP-0060"]
|
self._p = self.host.plugins["XEP-0060"]
|
||||||
|
self._h = self.host.plugins["XEP-0334"]
|
||||||
# map from namespace of the invitation to callback handling it
|
# map from namespace of the invitation to callback handling it
|
||||||
self._ns_cb = {}
|
self._ns_cb = {}
|
||||||
|
|
||||||
|
|
@ -113,6 +114,7 @@ class Invitation(object):
|
||||||
"extra": {},
|
"extra": {},
|
||||||
}
|
}
|
||||||
client.generateMessageXML(mess_data)
|
client.generateMessageXML(mess_data)
|
||||||
|
self._h.addHintElements(mess_data["xml"], [self._h.HINT_STORE])
|
||||||
invitation_elt = mess_data["xml"].addElement("invitation", NS_INVITATION)
|
invitation_elt = mess_data["xml"].addElement("invitation", NS_INVITATION)
|
||||||
if name is not None:
|
if name is not None:
|
||||||
invitation_elt["name"] = name
|
invitation_elt["name"] = name
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue