# HG changeset patch # User dvpdiner2@gmail.com # Date 1325487199 0 # Node ID fb45c0e52648f5d506c5ea022c89c3bc815af85e # Parent 84b5cd12b7c01f21001bdaa705e6660e9f9016f8 This should fix the everyone-is-the-same problem in chats. committer: Elliott Sales de Andrade diff -r 84b5cd12b7c0 -r fb45c0e52648 pidgin/gtkconv.c --- 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 {