summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poezio/core/handlers.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 3ae9420b..1278e29e 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -117,15 +117,16 @@ class HandlerCore:
if with_jid.bare in roster and roster[with_jid.bare].subscription != 'none':
return False
# then, check bookmarks
- if with_jid.bare in self.core.bookmarks:
- log.debug('MUC-PM from %s in bookmarks', with_jid)
- return True
+ jid_bare = with_jid.bare
+ for bm in self.core.bookmarks:
+ if bm.jid.bare == jid_bare:
+ log.debug('MUC-PM from %s in bookmarks', with_jid)
+ return True
# then, look whether we know the MUC JID
for tab in self.core.get_tabs(tabs.MucTab):
- if tab.jid.bare == with_jid.bare:
+ if tab.jid.bare == jid_bare:
if with_jid.resource:
- log.debug('MUC-PM from %s in known MucTab',
- with_jid)
+ log.debug('MUC-PM from %s in known MucTab', with_jid)
return True
return None