diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-04-06 18:55:20 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-04-06 19:15:06 +0200 |
commit | 3b2976c9cb740c5cbd45547e26e725f2bae847a2 (patch) | |
tree | f228b0f7629b3f10ca744247041134da3a91277e /src/event | |
parent | 3524a53c7c61783f021111755a5617b56bfaa234 (diff) | |
download | profani-tty-3b2976c9cb740c5cbd45547e26e725f2bae847a2.tar.gz |
db: Use type from message struct instead of having individual functions
Diffstat (limited to 'src/event')
-rw-r--r-- | src/event/server_events.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c index e75db88e..b63af3b6 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -301,7 +301,7 @@ static void _log_muc(ProfMessage *message) } else { groupchat_log_msg_in(message->jid->barejid, message->jid->resourcepart, message->plain); } - log_database_add_incoming_muc(message); + log_database_add_incoming(message); } void @@ -401,7 +401,7 @@ sv_ev_incoming_private_message(ProfMessage *message) } _clean_incoming_message(message); - log_database_add_incoming_muc_pm(message); + log_database_add_incoming(message); privwin_incoming_msg(privatewin, message); chat_log_msg_in(message); @@ -537,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_incoming_chat(message); + log_database_add_incoming(message); chatwin_incoming_msg(chatwin, message, new_win); if (logit) { chat_log_pgp_msg_in(message); @@ -553,7 +553,7 @@ _sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message message->enc = PROF_MSG_ENC_NONE; message->plain = strdup(message->body); _clean_incoming_message(message); - log_database_add_incoming_chat(message); + log_database_add_incoming(message); chatwin_incoming_msg(chatwin, message, new_win); chat_log_msg_in(message); chatwin->pgp_recv = FALSE; @@ -576,7 +576,7 @@ _sv_ev_incoming_otr(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message } _clean_incoming_message(message); - log_database_add_incoming_chat(message); + log_database_add_incoming(message); chatwin_incoming_msg(chatwin, message, new_win); chat_log_otr_msg_in(message); @@ -592,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_incoming_chat(message); + log_database_add_incoming(message); chatwin_incoming_msg(chatwin, message, new_win); if (logit) { chat_log_omemo_msg_in(message); @@ -608,7 +608,7 @@ _sv_ev_incoming_plain(ProfChatWin *chatwin, gboolean new_win, ProfMessage *messa message->enc = PROF_MSG_ENC_NONE; message->plain = strdup(message->body); _clean_incoming_message(message); - log_database_add_incoming_chat(message); + log_database_add_incoming(message); chatwin_incoming_msg(chatwin, message, new_win); if (logit) { chat_log_msg_in(message); |