diff options
author | James Booth <boothj5@gmail.com> | 2015-06-21 18:00:57 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-06-21 18:00:57 +0100 |
commit | 8d2d92360370747a34c25319a63d91a2775ffb85 (patch) | |
tree | bbe3a6fa3a59d9973d9b374e1bc4f22d11e14329 /src/event | |
parent | 9b991ae0586444af094c9e044715a7ceb63b6171 (diff) | |
download | profani-tty-8d2d92360370747a34c25319a63d91a2775ffb85.tar.gz |
Moved message display logic to sv_ev_incoming_message
Diffstat (limited to 'src/event')
-rw-r--r-- | src/event/server_events.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c index 270e7c98..5af19f7f 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -172,7 +172,13 @@ void sv_ev_incoming_message(char *barejid, char *resource, char *message) { #ifdef HAVE_LIBOTR - otr_on_message_recv(barejid, resource, message); + gboolean decrypted = FALSE; + char *otr_res = otr_on_message_recv(barejid, resource, message, &decrypted); + if (otr_res) { + ui_incoming_msg(barejid, resource, otr_res, NULL); + chat_log_otr_msg_in(barejid, otr_res, decrypted); + otr_free_message(otr_res); + } #else ui_incoming_msg(barejid, resource, message, NULL); chat_log_msg_in(barejid, message); |