about summary refs log tree commit diff stats
path: root/src/otr
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-03-28 01:16:31 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-04-06 10:50:20 +0200
commita0a4fd042648f0b936621b076694283dd577f016 (patch)
tree8d4164fdc512ec74fb139e78aec45fe8b70b55ab /src/otr
parentdef212321636b13a72fdff71431fc003ad791482 (diff)
downloadprofani-tty-a0a4fd042648f0b936621b076694283dd577f016.tar.gz
db: log all incoming and outgoing messages
Diffstat (limited to 'src/otr')
-rw-r--r--src/otr/otr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/otr/otr.c b/src/otr/otr.c
index ceef72fe..3c3ed618 100644
--- a/src/otr/otr.c
+++ b/src/otr/otr.c
@@ -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);