1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Add chat session state to OMEMO message stanza

This commit is contained in:
Paul Fariello 2019-02-28 20:22:10 +01:40
parent 904904d74e
commit d871efdcf9

View File

@ -327,6 +327,7 @@ message_send_chat_omemo(const char *const jid, uint32_t sid, GList *keys,
const unsigned char *const ciphertext, size_t ciphertext_len, const unsigned char *const ciphertext, size_t ciphertext_len,
gboolean request_receipt) gboolean request_receipt)
{ {
char *state = chat_session_get_state(barejid);
xmpp_ctx_t * const ctx = connection_get_ctx(); xmpp_ctx_t * const ctx = connection_get_ctx();
char *id = connection_create_stanza_id("msg"); char *id = connection_create_stanza_id("msg");
@ -406,6 +407,10 @@ message_send_chat_omemo(const char *const jid, uint32_t sid, GList *keys,
xmpp_stanza_release(body_text); xmpp_stanza_release(body_text);
xmpp_stanza_add_child(message, body); xmpp_stanza_add_child(message, body);
if (state) {
stanza_attach_state(ctx, message, state);
}
stanza_attach_carbons_private(ctx, message); stanza_attach_carbons_private(ctx, message);
stanza_attach_hints_no_copy(ctx, message); stanza_attach_hints_no_copy(ctx, message);
stanza_attach_hints_no_store(ctx, message); stanza_attach_hints_no_store(ctx, message);