about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorPaul Fariello <paul@fariello.eu>2019-07-04 13:02:22 +0200
committerPaul Fariello <paul@fariello.eu>2019-07-04 14:02:42 +0200
commitc0e8f72276c70e500aff07b3d73bd156ef4000e6 (patch)
tree8d77c2661ed03d580bde69ed357966948c1cadf8 /src
parent46ecdc335c61c5adf98894c927bd490ae862b306 (diff)
downloadprofani-tty-c0e8f72276c70e500aff07b3d73bd156ef4000e6.tar.gz
Fix plaintext private message handling
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/message.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index f22b751e..fd2b8e51 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -922,6 +922,9 @@ _private_chat_handler(xmpp_stanza_t *const stanza)
     }
 #endif
 
+    message->timestamp = stanza_get_delay(stanza);
+    message->body = xmpp_message_get_body(stanza);
+
     if (!message->plain && !message->body) {
         log_error("Message received without body from: %s", message->jid->str);
         goto out;
@@ -929,9 +932,6 @@ _private_chat_handler(xmpp_stanza_t *const stanza)
         message->plain = strdup(message->body);
     }
 
-    message->timestamp = stanza_get_delay(stanza);
-    message->body = xmpp_message_get_body(stanza);
-
     if (message->timestamp) {
         sv_ev_delayed_private_message(message);
     } else {