Mercurial > libervia-backend
diff sat/core/xmpp.py @ 3389:c3943afb4cac
core (xmpp): client.roster now implements __contains__
Now a jid can be tested directly with "entity_jid in client.roster".
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 12 Nov 2020 14:53:15 +0100 |
parents | dea30b1eb166 |
children | be6d91572633 |
line wrap: on
line diff
--- a/sat/core/xmpp.py Thu Nov 12 14:53:15 2020 +0100 +++ b/sat/core/xmpp.py Thu Nov 12 14:53:15 2020 +0100 @@ -1303,6 +1303,9 @@ self._jids = {} # map from jids to RosterItem: key=jid value=RosterItem self._groups = {} # map from groups to jids: key=group value=set of jids + def __contains__(self, entity_jid): + return self.isJidInRoster(entity_jid) + @property def versioning(self): """True if server support roster versioning"""