quick frontend (app): avoid resource locking on new message

This commit is contained in:
Goffi 2018-05-11 20:06:06 +02:00
commit a6956d424a

View file

@ -535,6 +535,9 @@ class QuickApp(object):
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)