Mercurial > libervia-backend
diff sat_frontends/quick_frontend/quick_app.py @ 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 | 2e6864b1d577 |
children | bd9d92bc0d6c |
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)