about summary refs log tree commit diff stats
path: root/src/xmpp/message.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-08-21 08:11:27 +0200
committerGitHub <noreply@github.com>2019-08-21 08:11:27 +0200
commit75c13d492225d51d6594ace508bad33cd26ff293 (patch)
treee31984a71af8924cfe7b1c2d2983981370f275ba /src/xmpp/message.c
parent1e873e1f4073b71c83c26adddd4a10c8c83ff8f4 (diff)
parent3228ab47d341f477aad7a03093807d4324ec9f68 (diff)
downloadprofani-tty-75c13d492225d51d6594ace508bad33cd26ff293.tar.gz
Merge pull request #1174 from weiss/check-muc-delay
Don't render (all) delayed messages as MUC history
Diffstat (limited to 'src/xmpp/message.c')
-rw-r--r--src/xmpp/message.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index fd2b8e51..033a7a11 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -821,12 +821,14 @@ _handle_groupchat(xmpp_stanza_t *const stanza)
     }
 
     // determine if the notifications happened whilst offline
-    message->timestamp = stanza_get_delay(stanza);
-    if (message->timestamp) {
+    gchar *from;
+    message->timestamp = stanza_get_delay_from(stanza, &from);
+    if (message->timestamp && g_strcmp0(jid->barejid, from) == 0) {
         sv_ev_room_history(message);
     } else {
         sv_ev_room_message(message);
     }
+    g_free(from);
 
 out:
     message_free(message);