about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-10-04 13:22:14 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-10-04 13:22:14 +0200
commit523681a642576f3889958849b503fffeb9bef280 (patch)
tree0031d692d38171e44355a4363a6ba9320dfdea92 /src
parentbf8fe3e7e69a46810745e61f852fcfab69b60238 (diff)
downloadprofani-tty-523681a642576f3889958849b503fffeb9bef280.tar.gz
Log outgoing carbons instead of incoming
Incoming carbons are logged as normal message already.
So we had this logged twice but didn't log outgoing carbons,
send from our account but by another client, at all.

Fix https://github.com/profanity-im/profanity/issues/1181
Diffstat (limited to 'src')
-rw-r--r--src/event/server_events.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c
index 0164888a..96b0611f 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -425,6 +425,10 @@ sv_ev_outgoing_carbon(ProfMessage *message)
 
     chat_state_active(chatwin->state);
 
+    if (message->plain) {
+        chat_log_msg_out(message->jid->barejid, message->plain);
+    }
+
 #ifdef HAVE_LIBGPGME
 #ifndef HAVE_OMEMO
     if (message->encrypted) {
@@ -734,10 +738,6 @@ sv_ev_incoming_carbon(ProfMessage *message)
 #endif
     }
 
-    if (message->plain) {
-        chat_log_msg_out(message->jid->barejid, message->plain);
-    }
-
 #ifdef HAVE_LIBGPGME
 #ifndef HAVE_OMEMO
     if (message->encrypted) {