about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-07-03 16:37:22 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-07-03 16:38:05 +0200
commit8ce299838dad3fe31e39d8254ae4ba80c8bd76a5 (patch)
tree0da31ac7dd77e62496eb56372a33417a2073a8cb /src/xmpp
parent0412ec96620cbb549e312209e7480611e1341abd (diff)
downloadprofani-tty-8ce299838dad3fe31e39d8254ae4ba80c8bd76a5.tar.gz
message.c: Remove from/to setting out of condition
Since its done in both cases.
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/message.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index e81f7ca7..a7c79243 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -1264,18 +1264,15 @@ _handle_carbons(xmpp_stanza_t *const stanza)
     }
 
     //TODO: maybe also add is_carbon maybe even an enum with outgoing/incoming
-    //could be that then we can have sv_ev_carbon no incoming/outgoing
     if (message->plain || message->encrypted || message->body) {
+        message->from_jid = jid_from;
+        message->to_jid = jid_to;
+
         // if we are the recipient, treat as standard incoming message
         if (g_strcmp0(mybarejid, jid_to->barejid) == 0) {
-            message->from_jid = jid_from;
-            message->to_jid = jid_to;
             sv_ev_incoming_carbon(message);
-
         // else treat as a sent message
         } else {
-            message->from_jid = jid_from;
-            message->to_jid = jid_to;
             sv_ev_outgoing_carbon(message);
         }
     }