Fix /message
This commit is contained in:
parent
c6cf2d08b7
commit
e9585c7ea1
1 changed files with 4 additions and 4 deletions
|
@ -162,7 +162,7 @@ class CommandCore:
|
||||||
log.debug(
|
log.debug(
|
||||||
'Could not send directed presence to %s', jid, exc_info=True)
|
'Could not send directed presence to %s', jid, exc_info=True)
|
||||||
return
|
return
|
||||||
tab = self.core.tabs.by_name_and_class(jid)
|
tab = self.core.tabs.by_name(jid)
|
||||||
if tab:
|
if tab:
|
||||||
if ptype in ('xa', 'away'):
|
if ptype in ('xa', 'away'):
|
||||||
tab.directed_presence = False
|
tab.directed_presence = False
|
||||||
|
@ -939,13 +939,13 @@ class CommandCore:
|
||||||
return self.core.information('Invalid JID.', 'Error')
|
return self.core.information('Invalid JID.', 'Error')
|
||||||
tab = self.core.get_conversation_by_jid(
|
tab = self.core.get_conversation_by_jid(
|
||||||
jid.full, False, fallback_barejid=False)
|
jid.full, False, fallback_barejid=False)
|
||||||
muc = self.core.tabs.by_name_and_class(jid.bare, typ=tabs.MucTab)
|
muc = self.core.tabs.by_name_and_class(jid.bare, tabs.MucTab)
|
||||||
if not tab and not muc:
|
if not tab and not muc:
|
||||||
tab = self.core.open_conversation_window(jid.full, focus=True)
|
tab = self.core.open_conversation_window(jid.full, focus=True)
|
||||||
elif muc:
|
elif muc:
|
||||||
if jid.resource:
|
if jid.resource:
|
||||||
tab = self.core.tabs.by_name_and_class(
|
tab = self.core.tabs.by_name_and_class(jid.full,
|
||||||
jid.full, typ=tabs.PrivateTab)
|
tabs.PrivateTab)
|
||||||
if tab:
|
if tab:
|
||||||
self.core.focus_tab(tab)
|
self.core.focus_tab(tab)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue