about summary refs log tree commit diff stats
path: root/src/xmpp/message.c
diff options
context:
space:
mode:
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);