Merge branch 'origin-id-non-default' into 'master'

Change origin-id defaults to False

See merge request poezio/slixmpp!202
This commit is contained in:
Link Mauve 2022-05-28 17:44:42 +02:00
commit 5ceb48bbcd
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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)