about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-10-19 23:24:33 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-10-19 23:24:33 +0200
commit31014b5e513234e9ee7696fc88eb9cab30d8a12e (patch)
treea1f0918e12f440c7410d5f114c466f27320145ba
parent2a4d1b8410ca993b55b2e000b65730dbb4c7b234 (diff)
downloadprofani-tty-31014b5e513234e9ee7696fc88eb9cab30d8a12e.tar.gz
Fix which message we want to log
-rw-r--r--src/event/server_events.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c
index 6b8792a8..cdbd5ad5 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -304,11 +304,9 @@ sv_ev_room_message(ProfMessage *message)
 
     char *mynick = muc_nick(mucwin->roomjid);
 
-    // messages from ourselves (account and this client)
-    if (g_strcmp0(mynick, message->jid->resourcepart) == 0 && message_is_sent_by_us(message)) {
-        _log_muc(message);
-    } else {
-        // messages from others
+    // only log message not coming from this client (but maybe same account, different client)
+    // our messages are logged when outgoing
+    if (!(g_strcmp0(mynick, message->jid->resourcepart) == 0 && message_is_sent_by_us(message))) {
         _log_muc(message);
     }