mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
Merge branch 'develop' into roster
This commit is contained in:
commit
65931bb384
4 changed files with 31 additions and 3 deletions
4
setup.py
4
setup.py
|
@ -46,7 +46,9 @@ packages = [ 'sleekxmpp',
|
|||
'sleekxmpp/thirdparty',
|
||||
'sleekxmpp/plugins',
|
||||
'sleekxmpp/plugins/xep_0030',
|
||||
'sleekxmpp/plugins/xep_0030/stanza'
|
||||
'sleekxmpp/plugins/xep_0030/stanza',
|
||||
'sleekxmpp/plugins/xep_0059',
|
||||
'sleekxmpp/plugins/xep_0092',
|
||||
]
|
||||
|
||||
if sys.version_info < (3, 0):
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
See the file LICENSE for copying permission.
|
||||
"""
|
||||
from . import base
|
||||
import log
|
||||
import logging
|
||||
from xml.etree import cElementTree as ET
|
||||
import copy
|
||||
import logging
|
||||
|
|
|
@ -199,3 +199,29 @@ class Iq(RootStanza):
|
|||
return waitfor.wait(timeout)
|
||||
else:
|
||||
return StanzaBase.send(self)
|
||||
|
||||
def _set_stanza_values(self, values):
|
||||
"""
|
||||
Set multiple stanza interface values using a dictionary.
|
||||
|
||||
Stanza plugin values may be set usind nested dictionaries.
|
||||
|
||||
If the interface 'query' is given, then it will be set
|
||||
last to avoid duplication of the <query /> element.
|
||||
|
||||
Overrides ElementBase._set_stanza_values.
|
||||
|
||||
Arguments:
|
||||
values -- A dictionary mapping stanza interface with values.
|
||||
Plugin interfaces may accept a nested dictionary that
|
||||
will be used recursively.
|
||||
"""
|
||||
query = values.get('query', '')
|
||||
if query:
|
||||
del values['query']
|
||||
StanzaBase._set_stanza_values(self, values)
|
||||
self['query'] = query
|
||||
else:
|
||||
StanzaBase._set_stanza_values(self, values)
|
||||
return self
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ class JID(object):
|
|||
if self._domain is None:
|
||||
self._domain = self._jid.split('@', 1)[-1].split('/', 1)[0]
|
||||
return self._domain or ""
|
||||
elif name == 'full':
|
||||
elif name in ('full', 'jid'):
|
||||
return self._jid or ""
|
||||
elif name == 'bare':
|
||||
if self._bare is None:
|
||||
|
|
Loading…
Reference in a new issue