mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 17:46:21 +00:00
xep-0308: correct incoming MUC PMs
This commit is contained in:
@@ -966,6 +966,20 @@ _private_chat_handler(xmpp_stanza_t *const stanza)
|
||||
const gchar *from = xmpp_stanza_get_from(stanza);
|
||||
message->jid = jid_create(from);
|
||||
|
||||
// message stanza id
|
||||
const char *id = xmpp_stanza_get_id(stanza);
|
||||
if (id) {
|
||||
message->id = strdup(id);
|
||||
}
|
||||
|
||||
xmpp_stanza_t *replace_id_stanza = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_LAST_MESSAGE_CORRECTION);
|
||||
if (replace_id_stanza) {
|
||||
const char *replace_id = xmpp_stanza_get_id(replace_id_stanza);
|
||||
if (replace_id) {
|
||||
message->replace_id = strdup(replace_id);
|
||||
}
|
||||
}
|
||||
|
||||
// check omemo encryption
|
||||
#ifdef HAVE_OMEMO
|
||||
message->plain = omemo_receive_message(stanza, &message->trusted);
|
||||
|
||||
Reference in New Issue
Block a user