Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2022-10-01 01:39:13 +0300
committerPhilipp Hörist <philipp@hoerist.com>2022-10-01 01:43:32 +0300
commit10c86624ad4f42c838f4b7e1be03b8c4f1df81ea (patch)
tree9a760e9847e839c2eca35677cacc570adcb31f65
parent3c849310e8f3ab7ad3d1d14fb3c4c5d34f1ed54c (diff)
refactor: Store messages before raising MessageSent event
-rw-r--r--gajim/common/client.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/gajim/common/client.py b/gajim/common/client.py
index 0efa4b6c5..339fe52f8 100644
--- a/gajim/common/client.py
+++ b/gajim/common/client.py
@@ -503,6 +503,9 @@ class Client(Observable):
message.set_sent_timestamp()
message.message_id = self.send_stanza(message.stanza)
+ if not message.is_groupchat:
+ self.get_module('Message').log_message(message)
+
app.ged.raise_event(
MessageSent(jid=message.jid,
account=message.account,
@@ -515,11 +518,6 @@ class Client(Observable):
message_id=message.message_id,
play_sound=message.play_sound))
- if message.is_groupchat:
- return
-
- self.get_module('Message').log_message(message)
-
def _prepare_for_connect(self) -> None:
custom_host = get_custom_host(self._account)
if custom_host is not None: