Add prof_message_t to wrap all message attributes
Probably missing copy of body to plain in carbon and privmessage. Only covers the incoming message path because goal is OMEMO decryption of untrusted message. Cover some of the log functions but not all.
This commit is contained in:
@@ -347,7 +347,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);
|
||||
chat_log_otr_msg_out(chatwin->barejid, message);
|
||||
chatwin_outgoing_msg(chatwin, message, id, PROF_MSG_OTR, request_receipt);
|
||||
chatwin_outgoing_msg(chatwin, message, id, PROF_MSG_ENC_OTR, request_receipt);
|
||||
otr_free_message(encrypted);
|
||||
free(id);
|
||||
return TRUE;
|
||||
@@ -367,7 +367,7 @@ otr_on_message_send(ProfChatWin *chatwin, const char *const message, gboolean re
|
||||
if (policy == PROF_OTRPOLICY_OPPORTUNISTIC) {
|
||||
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_PLAIN, request_receipt);
|
||||
chatwin_outgoing_msg(chatwin, message, id, PROF_MSG_ENC_PLAIN, request_receipt);
|
||||
chat_log_msg_out(chatwin->barejid, message);
|
||||
free(otr_tagged_msg);
|
||||
free(id);
|
||||
|
||||
Reference in New Issue
Block a user