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

@@ -40,6 +40,7 @@
#include <glib.h>
#include "log.h"
#include "database.h"
#include "config/preferences.h"
#include "config/files.h"
#include "otr/otr.h"
@@ -348,6 +349,7 @@ otr_on_message_send(ProfChatWin *chatwin, const char *const message, gboolean re
if (encrypted) {
id = message_send_chat_otr(chatwin->barejid, encrypted, request_receipt, replace_id);
chat_log_otr_msg_out(chatwin->barejid, message, NULL);
log_database_add_outgoing_chat(id, chatwin->barejid, message, replace_id, PROF_MSG_ENC_OTR);
chatwin_outgoing_msg(chatwin, message, id, PROF_MSG_ENC_OTR, request_receipt, replace_id);
otr_free_message(encrypted);
free(id);