changeset 2586:57c8c155192f

quick frontend (app): avoid resource locking on new message
author Goffi <goffi@goffi.org>
date Fri, 11 May 2018 20:06:06 +0200
parents 0112c1f7dcf0
children e70023e84974
files sat_frontends/quick_frontend/quick_app.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sat_frontends/quick_frontend/quick_app.py	Fri May 11 18:20:39 2018 +0200
+++ b/sat_frontends/quick_frontend/quick_app.py	Fri May 11 20:06:06 2018 +0200
@@ -535,6 +535,9 @@
         from_me = from_jid.bare == self.profiles[profile].whoami.bare
         target = to_jid if from_me else from_jid
         contact_list = self.contact_lists[profile]
+        if target.resource and not contact_list.isRoom(target.bare):
+            # we avoid resource locking, but we must keep resource for private MUC messages
+            target = target.bare
         # we want to be sure to have at least one QuickChat instance
         self.widgets.getOrCreateWidget(quick_chat.QuickChat, target, type_=C.CHAT_ONE2ONE, on_new_widget=None, profile=profile)