From c3a9f074a2cb28474ff3ec56d800a14e6e655f5d Mon Sep 17 00:00:00 2001 From: eionrobb Date: Thu, 25 Jun 2015 21:43:59 +0000 Subject: Display historical messages that were sent by the current user in a nicer way --- steam-mobile/libsteam.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/steam-mobile/libsteam.c b/steam-mobile/libsteam.c index ece5f6c..644348d 100644 --- a/steam-mobile/libsteam.c +++ b/steam-mobile/libsteam.c @@ -872,7 +872,12 @@ steam_get_offline_history_cb(SteamAccount *sa, JsonObject *obj, gpointer user_da const gchar *text = json_object_get_string_member(message, "message"); if (g_str_equal(steam_accountid_to_steamid(accountid), sa->steamid)) { - serv_got_im(sa->pc, who, text, PURPLE_MESSAGE_SEND, timestamp); + PurpleConversation *conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, who, sa->account); + if (conv == NULL) + { + conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, sa->account, who); + } + purple_conversation_write(conv, who, text, PURPLE_MESSAGE_SEND, timestamp); } else { serv_got_im(sa->pc, who, text, PURPLE_MESSAGE_RECV, timestamp); } -- cgit v1.2.3