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:
commit
5ceb48bbcd
@ -140,7 +140,7 @@ class BaseXMPP(XMLStream):
|
|||||||
self.use_presence_ids = True
|
self.use_presence_ids = True
|
||||||
|
|
||||||
#: XEP-0359 <origin-id/> tag that gets added to <message/> stanzas.
|
#: 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
|
#: The API registry is a way to process callbacks based on
|
||||||
#: JID+node combinations. Each callback in the registry is
|
#: JID+node combinations. Each callback in the registry is
|
||||||
|
@ -64,9 +64,9 @@ class Message(RootStanza):
|
|||||||
if self.stream:
|
if self.stream:
|
||||||
use_ids = getattr(self.stream, 'use_message_ids', None)
|
use_ids = getattr(self.stream, 'use_message_ids', None)
|
||||||
if use_ids:
|
if use_ids:
|
||||||
self['id'] = self.stream.new_id()
|
self.set_id(self.stream.new_id())
|
||||||
else:
|
else:
|
||||||
del self['origin_id']
|
self.del_origin_id()
|
||||||
|
|
||||||
def get_type(self):
|
def get_type(self):
|
||||||
"""
|
"""
|
||||||
@ -96,8 +96,8 @@ class Message(RootStanza):
|
|||||||
self.xml.attrib['id'] = value
|
self.xml.attrib['id'] = value
|
||||||
|
|
||||||
if self.stream:
|
if self.stream:
|
||||||
use_orig_ids = getattr(self.stream, 'use_origin_id', None)
|
if not getattr(self.stream, 'use_origin_id', False):
|
||||||
if not use_orig_ids:
|
self.del_origin_id()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
sub = self.xml.find(ORIGIN_NAME)
|
sub = self.xml.find(ORIGIN_NAME)
|
||||||
|
Loading…
Reference in New Issue
Block a user