Actually log MUC PM messages

If I'm not mistaken MUC PMs have not been logged at all if there was no
other client sending carbons.
This should add MUC PM logging functionality.

We still need to make sure carbons log to the same file.

Regards https://github.com/profanity-im/profanity/issues/1214
This commit is contained in:
Michael Vetter
2019-10-28 23:36:42 +01:00
parent f186eb94da
commit 8c8c18c6fd
5 changed files with 33 additions and 28 deletions

View File

@@ -346,7 +346,7 @@ otr_on_message_send(ProfChatWin *chatwin, const char *const message, gboolean re
char *encrypted = otr_encrypt_message(chatwin->barejid, message);
if (encrypted) {
id = message_send_chat_otr(chatwin->barejid, encrypted, request_receipt);
chat_log_otr_msg_out(chatwin->barejid, message);
chat_log_otr_msg_out(chatwin->barejid, message, NULL);
chatwin_outgoing_msg(chatwin, message, id, PROF_MSG_ENC_OTR, request_receipt);
otr_free_message(encrypted);
free(id);
@@ -368,7 +368,7 @@ otr_on_message_send(ProfChatWin *chatwin, const char *const message, gboolean re
char *otr_tagged_msg = otr_tag_message(message);
id = message_send_chat_otr(chatwin->barejid, otr_tagged_msg, request_receipt);
chatwin_outgoing_msg(chatwin, message, id, PROF_MSG_ENC_PLAIN, request_receipt);
chat_log_msg_out(chatwin->barejid, message);
chat_log_msg_out(chatwin->barejid, message, NULL);
free(otr_tagged_msg);
free(id);
return TRUE;