diff options
Diffstat (limited to 'src/xmpp/message.c')
-rw-r--r-- | src/xmpp/message.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c index d1808ba5..b6f7f5c7 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -831,16 +831,17 @@ _handle_groupchat(xmpp_stanza_t *const stanza) } // determine if the notifications happened whilst offline - gchar *from; - message->timestamp = stanza_get_delay_from(stanza, &from); - // checking the domainpart is a workaround for some prosody versions (gh#1190) - if (message->timestamp && (g_strcmp0(jid->barejid, from) == 0 - || g_strcmp0(jid->domainpart, from) == 0)) { + message->timestamp = stanza_get_delay_from(stanza, jid->barejid); + if (message->timestamp == NULL) { + // checking the domainpart is a workaround for some prosody versions (gh#1190) + message->timestamp = stanza_get_delay_from(stanza, jid->domainpart); + } + + if (message->timestamp) { sv_ev_room_history(message); } else { sv_ev_room_message(message); } - g_free(from); out: message_free(message); |