diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py index e2865d39..ab52dfbb 100644 --- a/sleekxmpp/basexmpp.py +++ b/sleekxmpp/basexmpp.py @@ -617,7 +617,7 @@ class BaseXMPP(XMLStream): 'in_roster': False} # Alias to simplify some references. - connections = self.roster[jid]['presence'] + connections = self.roster[jid].get('presence', {}) # Determine if the user has just come online. if not resource in connections: