From c0e8f72276c70e500aff07b3d73bd156ef4000e6 Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Thu, 4 Jul 2019 13:02:22 +0200 Subject: Fix plaintext private message handling --- src/xmpp/message.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 { -- cgit 1.4.1-2-gfad0