From f9e0994311e6810050df2ff7ba7b9f982a662065 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 16 Apr 2021 18:46:48 +0200 Subject: fix: when sendingg a muc message, send the inactive chatstate apart Fix #3509 --- poezio/tabs/muctab.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py index becabfc5..31ca7884 100644 --- a/poezio/tabs/muctab.py +++ b/poezio/tabs/muctab.py @@ -1714,7 +1714,7 @@ class MucTab(ChatTab): /say Or normal input + enter """ - needed = 'inactive' if self.inactive else 'active' + chatstate = 'inactive' if self.inactive else 'active' msg = self.core.xmpp.make_message(self.jid.bare) msg['type'] = 'groupchat' msg['body'] = line @@ -1732,7 +1732,10 @@ class MucTab(ChatTab): 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): - msg['chat_state'] = needed + if chatstate == 'inactive': + self.send_chat_state(chatstate, always_send=True) + else: + msg['chat_state'] = chatstate if correct: msg['replace']['id'] = self.last_sent_message['id'] # type: ignore self.cancel_paused_delay() @@ -1745,7 +1748,7 @@ class MucTab(ChatTab): # TODO: #3314. Display outgoing MUC message. self.set_last_sent_message(msg, correct=correct) msg.send() - self.chat_state = needed + self.chat_state = chatstate @command_args_parser.raw def command_xhtml(self, msg: str) -> None: -- cgit v1.2.3