session: Also fire the session_start event.

This commit is contained in:
Emmanuel Gil Peyrot 2018-03-14 19:39:01 +01:00
parent 084d6cb5d9
commit 769bc6d3bf

View File

@ -43,7 +43,11 @@ class FeatureSession(BasePlugin):
Arguments:
feature -- The stream features element.
"""
if not features['session']['optional']:
if features['session']['optional']:
self.xmpp.sessionstarted = True
self.xmpp.event('session_start')
return
iq = self.xmpp.Iq()
iq['type'] = 'set'
iq.enable('session')