Show message received text for receipts

This commit is contained in:
James Booth
2015-03-11 23:47:11 +00:00
parent 78becceedb
commit 57c7564445
11 changed files with 54 additions and 34 deletions

View File

@@ -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);
}

View File

@@ -122,7 +122,7 @@ void ui_disconnected(void);
void ui_recipient_gone(const char * const barejid, const char * const resource);
void ui_outgoing_chat_msg(const char * const from, const char * const barejid,
const char * const message);
const char * const message, char *id);
void ui_outgoing_private_msg(const char * const from, const char * const fulljid,
const char * const message);