about summary refs log tree commit diff stats
path: root/src/event
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-03-27 19:50:24 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-04-06 10:50:20 +0200
commitaf2630a289cfd06c41614fd5eca5d2846adaefaa (patch)
treeaad5ba321c192b27cd098043231ea491084837c1 /src/event
parent9278ba775b91eedef1b5ce1662681377205ff7b8 (diff)
downloadprofani-tty-af2630a289cfd06c41614fd5eca5d2846adaefaa.tar.gz
db: insert message type
Diffstat (limited to 'src/event')
-rw-r--r--src/event/server_events.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c
index 86176078..6e03725c 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -327,7 +327,7 @@ sv_ev_room_message(ProfMessage *message)
     GList *triggers = prefs_message_get_triggers(message->plain);
 
     _clean_incoming_message(message);
-    log_database_add(message, TRUE);
+    log_database_add(message, "muc");
     mucwin_incoming_msg(mucwin, message, mentions, triggers, TRUE);
 
     g_slist_free(mentions);
@@ -401,6 +401,7 @@ sv_ev_incoming_private_message(ProfMessage *message)
     }
 
     _clean_incoming_message(message);
+    log_database_add(message, "mucpm");
     privwin_incoming_msg(privatewin, message);
     chat_log_msg_in(message);
 
@@ -536,7 +537,7 @@ _sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message
     if (message->plain) {
         message->enc = PROF_MSG_ENC_PGP;
         _clean_incoming_message(message);
-        log_database_add(message, FALSE);
+        log_database_add(message, "chat");
         chatwin_incoming_msg(chatwin, message, new_win);
         if (logit) {
             chat_log_pgp_msg_in(message);
@@ -552,7 +553,7 @@ _sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message
         message->enc = PROF_MSG_ENC_PLAIN;
         message->plain = strdup(message->body);
         _clean_incoming_message(message);
-        log_database_add(message, FALSE);
+        log_database_add(message, "chat");
         chatwin_incoming_msg(chatwin, message, new_win);
         chat_log_msg_in(message);
         chatwin->pgp_recv = FALSE;
@@ -575,7 +576,7 @@ _sv_ev_incoming_otr(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message
         }
 
         _clean_incoming_message(message);
-        log_database_add(message, FALSE);
+        log_database_add(message, "chat");
         chatwin_incoming_msg(chatwin, message, new_win);
 
         chat_log_otr_msg_in(message);
@@ -591,7 +592,7 @@ static void
 _sv_ev_incoming_omemo(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message, gboolean logit)
 {
     _clean_incoming_message(message);
-    log_database_add(message, FALSE);
+    log_database_add(message, "chat");
     chatwin_incoming_msg(chatwin, message, new_win);
     if (logit) {
         chat_log_omemo_msg_in(message);
@@ -607,7 +608,7 @@ _sv_ev_incoming_plain(ProfChatWin *chatwin, gboolean new_win, ProfMessage *messa
         message->enc = PROF_MSG_ENC_PLAIN;
         message->plain = strdup(message->body);
         _clean_incoming_message(message);
-        log_database_add(message, FALSE);
+        log_database_add(message, "chat");
         chatwin_incoming_msg(chatwin, message, new_win);
         if (logit) {
             chat_log_msg_in(message);