summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Lukas <georg@op-co.de>2018-04-03 22:53:29 +0200
committermathieui <mathieui@mathieui.net>2018-05-31 23:46:58 +0200
commit0319ce5079bffec5cad9637ee396d489194d63e7 (patch)
tree7adce1db518fc026a1f93d01bfdb1739ff0749f7
parentefc9489f332cf529e8fb6a24a21a97f08f812f1d (diff)
downloadpoezio-0319ce5079bffec5cad9637ee396d489194d63e7.tar.gz
poezio-0319ce5079bffec5cad9637ee396d489194d63e7.tar.bz2
poezio-0319ce5079bffec5cad9637ee396d489194d63e7.tar.xz
poezio-0319ce5079bffec5cad9637ee396d489194d63e7.zip
MUC-PM: bare-JID messages can't be PMs
-rw-r--r--poezio/core/handlers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 8f8ff8bc..268c9733 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -137,8 +137,9 @@ class HandlerCore:
self.on_normal_message(sent)
sent = message['carbon_sent']
- if (sent['to'].bare not in roster
- or roster[sent['to'].bare].subscription == 'none'):
+ # todo: implement proper MUC detection logic
+ if (sent['to'].resource and (sent['to'].bare not in roster
+ or roster[sent['to'].bare].subscription == 'none')):
fixes.has_identity(
self.core.xmpp,
sent['to'].server,