Mercurial > pidgin
changeset 32424:fb45c0e52648
This should fix the everyone-is-the-same problem in chats.
committer: Elliott Sales de Andrade <qulogic@pidgin.im>
author | dvpdiner2@gmail.com |
---|---|
date | Mon, 02 Jan 2012 06:53:19 +0000 |
parents | 84b5cd12b7c0 |
children | 2abaa6070134 |
files | pidgin/gtkconv.c |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Sat Dec 31 15:48:20 2011 +0000 +++ b/pidgin/gtkconv.c Mon Jan 02 06:53:19 2012 +0000 @@ -6286,8 +6286,16 @@ } else if (flags & PURPLE_MESSAGE_SEND) { message_html = pidgin_conversation_theme_get_template(gtkconv->theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_OUTGOING_CONTENT); } else if ((flags & PURPLE_MESSAGE_RECV) && (old_flags & PURPLE_MESSAGE_RECV)) { - message_html = pidgin_conversation_theme_get_template(gtkconv->theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_NEXT_CONTENT); - func = "appendNextMessage"; + GList *history = purple_conversation_get_message_history(conv); + PurpleConvMessage *last_msg = (PurpleConvMessage *)history->data; + + /* If the senders are the same, use appendNextMessage */ + if (purple_strequal(purple_conversation_message_get_sender(last_msg), name)) { + message_html = pidgin_conversation_theme_get_template(gtkconv->theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_NEXT_CONTENT); + func = "appendNextMessage"; + } else { + message_html = pidgin_conversation_theme_get_template(gtkconv->theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_CONTENT); + } } else if (flags & PURPLE_MESSAGE_RECV) { message_html = pidgin_conversation_theme_get_template(gtkconv->theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_CONTENT); } else {