basexmpp: Make origin-id opt-out
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
fef575ee1a
commit
3253d34c0a
2 changed files with 6 additions and 0 deletions
|
@ -111,6 +111,9 @@ class BaseXMPP(XMLStream):
|
|||
#: outgoing messages an ID.
|
||||
self.use_presence_ids = True
|
||||
|
||||
#: XEP-0359 <origin-id/> tag that gets added to <message/> stanzas.
|
||||
self.use_origin_id = True
|
||||
|
||||
#: The API registry is a way to process callbacks based on
|
||||
#: JID+node combinations. Each callback in the registry is
|
||||
#: marked with:
|
||||
|
|
|
@ -96,6 +96,9 @@ class Message(RootStanza):
|
|||
|
||||
self.xml.attrib['id'] = value
|
||||
|
||||
if not self.stream.use_origin_id:
|
||||
return None
|
||||
|
||||
sub = self.xml.find(ORIGIN_NAME)
|
||||
if sub is not None:
|
||||
sub.attrib['id'] = value
|
||||
|
|
Loading…
Reference in a new issue