Commit 3591221e authored by mathieui's avatar mathieui

fix: split inactive chatstates from message in one to one tabs

parent f9e09943
Pipeline #3886 passed with stages
in 6 minutes and 6 seconds
......@@ -131,8 +131,10 @@ class ConversationTab(OneToOneTab):
msg['html']['body'] = xhtml.poezio_colors_to_html(msg['body'])
msg['body'] = xhtml.clean_text(msg['body'])
if config.get_by_tabname('send_chat_states', self.general_jid):
needed = 'inactive' if self.inactive else 'active'
msg['chat_state'] = needed
if self.inactive:
self.send_chat_state('inactive', always_send=True)
else:
msg['chat_state'] = 'active'
if attention:
msg['attention'] = True
self.core.events.trigger('conversation_say_after', msg, self)
......
......@@ -167,8 +167,10 @@ class PrivateTab(OneToOneTab):
msg['html']['body'] = xhtml.poezio_colors_to_html(msg['body'])
msg['body'] = xhtml.clean_text(msg['body'])
if config.get_by_tabname('send_chat_states', self.general_jid):
needed = 'inactive' if self.inactive else 'active'
msg['chat_state'] = needed
if self.inactive:
self.send_chat_state('inactive', always_send=True)
else:
msg['chat_state'] = 'active'
if attention:
msg['attention'] = True
self.core.events.trigger('private_say_after', msg, self)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment