db: log all incoming and outgoing messages

This commit is contained in:
Michael Vetter
2020-03-28 01:16:31 +01:00
parent def2123216
commit a0a4fd0426
6 changed files with 64 additions and 25 deletions

View File

@@ -508,7 +508,7 @@ message_send_chat_omemo(const char *const jid, uint32_t sid, GList *keys,
}
#endif
void
char*
message_send_private(const char *const fulljid, const char *const msg, const char *const oob_url)
{
xmpp_ctx_t * const ctx = connection_get_ctx();
@@ -517,14 +517,14 @@ message_send_private(const char *const fulljid, const char *const msg, const cha
xmpp_stanza_t *message = xmpp_message_new(ctx, STANZA_TYPE_CHAT, fulljid, id);
xmpp_message_set_body(message, msg);
free(id);
if (oob_url) {
stanza_attach_x_oob_url(ctx, message, oob_url);
}
_send_message_stanza(message);
xmpp_stanza_release(message);
return id;
}
char*