Don't render (all) delayed messages as MUC history
Double-check that a <delay/> tag on a groupchat message was actually added by the MUC service (rather than the sending client) before assuming it was received from the MUC history. Fixes #1173.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user