summaryrefslogtreecommitdiff
path: root/sleekxmpp/basexmpp.py
diff options
context:
space:
mode:
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: