From 3591221e04a539d5eaea8252c363c78515adc171 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 16 Apr 2021 18:51:01 +0200 Subject: fix: split inactive chatstates from message in one to one tabs --- poezio/tabs/conversationtab.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'poezio/tabs/conversationtab.py') diff --git a/poezio/tabs/conversationtab.py b/poezio/tabs/conversationtab.py index b8acfd8b..78faf49a 100644 --- a/poezio/tabs/conversationtab.py +++ b/poezio/tabs/conversationtab.py @@ -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) -- cgit v1.2.3