diff options
author | James Booth <boothj5@gmail.com> | 2015-03-11 23:47:11 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-03-11 23:47:11 +0000 |
commit | 57c7564445bb9b3034be895a709d8ec777188a74 (patch) | |
tree | bc1d30407978e03e48978ccd512e0608e0b12f1d /src/ui/core.c | |
parent | 78becceedb19b1a793fcd3465363501f5468a83d (diff) | |
download | profani-tty-57c7564445bb9b3034be895a709d8ec777188a74.tar.gz |
Show message received text for receipts
Diffstat (limited to 'src/ui/core.c')
-rw-r--r-- | src/ui/core.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index 48143f48..f43fb2a4 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1424,7 +1424,7 @@ ui_open_xmlconsole_win(void) void ui_outgoing_chat_msg(const char * const from, const char * const barejid, - const char * const message) + const char * const message, char *id) { PContact contact = roster_get_contact(barejid); ProfWin *window = (ProfWin*)wins_get_chat(barejid); @@ -1460,7 +1460,16 @@ ui_outgoing_chat_msg(const char * const from, const char * const barejid, ProfChatWin *chatwin = (ProfChatWin*)window; chat_state_active(chatwin->state); - win_save_print(window, '-', NULL, 0, THEME_TEXT_ME, from, message); + if (id) { + GString *message_with_id = g_string_new(id); + g_string_append(message_with_id, ": "); + g_string_append(message_with_id, message); + win_save_print(window, '-', NULL, 0, THEME_TEXT_ME, from, message_with_id->str); + g_string_free(message_with_id, TRUE); + free(id); + } else { + win_save_print(window, '-', NULL, 0, THEME_TEXT_ME, from, message); + } ui_switch_win(num); } |