diff options
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/message.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c index b1dc829e..7b10376e 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -827,13 +827,23 @@ _handle_groupchat(xmpp_stanza_t *const stanza) ProfMessage *message = message_init(); message->jid = jid; + if (id) { message->id = strdup(id); } + if (originid) { message->originid = strdup(originid); } + 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); + } + } + message->body = xmpp_message_get_body(stanza); // check omemo encryption |