Change session_start callback to async in most examples
If we fetch the roster, we should probably wait until we get it back
This commit is contained in:
@@ -30,7 +30,7 @@ class AdminCommands(slixmpp.ClientXMPP):
|
||||
|
||||
self.add_event_handler("session_start", self.start)
|
||||
|
||||
def start(self, event):
|
||||
async def start(self, event):
|
||||
"""
|
||||
Process the session_start event.
|
||||
|
||||
@@ -44,7 +44,7 @@ class AdminCommands(slixmpp.ClientXMPP):
|
||||
data.
|
||||
"""
|
||||
self.send_presence()
|
||||
self.get_roster()
|
||||
await self.get_roster()
|
||||
|
||||
def command_success(iq, session):
|
||||
print('Command completed')
|
||||
|
||||
Reference in New Issue
Block a user