1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Renamed incoming otr message

This commit is contained in:
James Booth 2015-04-27 22:34:06 +01:00
parent bc9e6b79cd
commit f219302f06

View File

@ -322,7 +322,7 @@ srv_incoming_message(char *barejid, char *resource, char *message)
{ {
#ifdef HAVE_LIBOTR #ifdef HAVE_LIBOTR
gboolean was_decrypted = FALSE; gboolean was_decrypted = FALSE;
char *newmessage; char *otr_message;
prof_otrpolicy_t policy = otr_get_policy(barejid); prof_otrpolicy_t policy = otr_get_policy(barejid);
char *whitespace_base = strstr(message,OTRL_MESSAGE_TAG_BASE); char *whitespace_base = strstr(message,OTRL_MESSAGE_TAG_BASE);
@ -344,10 +344,10 @@ srv_incoming_message(char *barejid, char *resource, char *message)
} }
} }
} }
newmessage = otr_decrypt_message(barejid, message, &was_decrypted); otr_message = otr_decrypt_message(barejid, message, &was_decrypted);
// internal OTR message // internal OTR message
if (newmessage == NULL) { if (otr_message == NULL) {
return; return;
} }
@ -357,9 +357,9 @@ srv_incoming_message(char *barejid, char *resource, char *message)
message_send_chat_encrypted(barejid, otr_query_message); message_send_chat_encrypted(barejid, otr_query_message);
} }
ui_incoming_msg(barejid, resource, newmessage, NULL); ui_incoming_msg(barejid, resource, otr_message, NULL);
chat_log_otr_msg_in(barejid, newmessage, was_decrypted); chat_log_otr_msg_in(barejid, otr_message, was_decrypted);
otr_free_message(newmessage); otr_free_message(otr_message);
#else #else
ui_incoming_msg(barejid, resource, message, NULL); ui_incoming_msg(barejid, resource, message, NULL);
chat_log_msg_in(barejid, message); chat_log_msg_in(barejid, message);