summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2022-05-28 13:50:09 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2022-05-28 13:50:09 +0200
commit916894ab7cd0c36da182ce67320ace6ea223a2d9 (patch)
treefdb08feca95805fcb0b41b41a57eed05940ba219
parent566e7dc771d74e8c41698a86d6cf782066d46e44 (diff)
downloadslixmpp-916894ab7cd0c36da182ce67320ace6ea223a2d9.tar.gz
slixmpp-916894ab7cd0c36da182ce67320ace6ea223a2d9.tar.bz2
slixmpp-916894ab7cd0c36da182ce67320ace6ea223a2d9.tar.xz
slixmpp-916894ab7cd0c36da182ce67320ace6ea223a2d9.zip
Change origin-id defaults to False
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--slixmpp/basexmpp.py2
-rw-r--r--slixmpp/stanza/message.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/slixmpp/basexmpp.py b/slixmpp/basexmpp.py
index cd228312..c54ec63a 100644
--- a/slixmpp/basexmpp.py
+++ b/slixmpp/basexmpp.py
@@ -140,7 +140,7 @@ class BaseXMPP(XMLStream):
self.use_presence_ids = True
#: XEP-0359 <origin-id/> tag that gets added to <message/> stanzas.
- self.use_origin_id = True
+ self.use_origin_id = False
#: The API registry is a way to process callbacks based on
#: JID+node combinations. Each callback in the registry is
diff --git a/slixmpp/stanza/message.py b/slixmpp/stanza/message.py
index 50d32ff0..eda11df6 100644
--- a/slixmpp/stanza/message.py
+++ b/slixmpp/stanza/message.py
@@ -64,9 +64,9 @@ class Message(RootStanza):
if self.stream:
use_ids = getattr(self.stream, 'use_message_ids', None)
if use_ids:
- self['id'] = self.stream.new_id()
+ self.set_id(self.stream.new_id())
else:
- del self['origin_id']
+ self.del_origin_id()
def get_type(self):
"""
@@ -96,8 +96,8 @@ class Message(RootStanza):
self.xml.attrib['id'] = value
if self.stream:
- use_orig_ids = getattr(self.stream, 'use_origin_id', None)
- if not use_orig_ids:
+ if not getattr(self.stream, 'use_origin_id', False):
+ self.del_origin_id()
return None
sub = self.xml.find(ORIGIN_NAME)