summaryrefslogtreecommitdiff
path: root/sleekxmpp/basexmpp.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-10-15 22:27:30 -0700
committerLance Stout <lancestout@gmail.com>2012-10-15 22:27:30 -0700
commit77f2a339e1626501a1df388050f09342d7bbcd1d (patch)
tree7ea3d3889628bd2509797a7069de0560a2c6252c /sleekxmpp/basexmpp.py
parent7c485c6a8b25b97c7faa4abda6e82200bd09bcae (diff)
parent4190027a787f878b4ea07ddd24883bb9d1a94d6e (diff)
downloadslixmpp-77f2a339e1626501a1df388050f09342d7bbcd1d.tar.gz
slixmpp-77f2a339e1626501a1df388050f09342d7bbcd1d.tar.bz2
slixmpp-77f2a339e1626501a1df388050f09342d7bbcd1d.tar.xz
slixmpp-77f2a339e1626501a1df388050f09342d7bbcd1d.zip
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/basexmpp.py')
-rw-r--r--sleekxmpp/basexmpp.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py
index 55250751..f26c048f 100644
--- a/sleekxmpp/basexmpp.py
+++ b/sleekxmpp/basexmpp.py
@@ -212,6 +212,10 @@ class BaseXMPP(XMLStream):
self.stream_version = xml.get('version', '')
self.peer_default_lang = xml.get('{%s}lang' % XML_NS, None)
+ if not self.is_component and not self.stream_version:
+ log.warning('Legacy XMPP 0.9 protocol detected.')
+ self.event('legacy_protocol')
+
def process(self, *args, **kwargs):
"""Initialize plugins and begin processing the XML stream.
@@ -742,6 +746,8 @@ class BaseXMPP(XMLStream):
item = self.roster[pres['to']][pres['from']]
if item['whitelisted']:
item.authorize()
+ if roster.auto_subscribe:
+ item.subscribe()
elif roster.auto_authorize:
item.authorize()
if roster.auto_subscribe: