diff options
author | eionrobb <eionrobb@8ca6c67d-4297-256d-f884-781da6d5760b> | 2015-06-26 00:43:59 +0300 |
---|---|---|
committer | eionrobb <eionrobb@8ca6c67d-4297-256d-f884-781da6d5760b> | 2015-06-26 00:43:59 +0300 |
commit | c3a9f074a2cb28474ff3ec56d800a14e6e655f5d (patch) | |
tree | 6c39bba9c2f5b73b7cfdb36107f423de268c1766 | |
parent | c4ef1d3673a79b6e37037012a68200092fa59722 (diff) |
Display historical messages that were sent by the current user in a nicer way
-rw-r--r-- | steam-mobile/libsteam.c | 7 |
1 files changed, 6 insertions, 1 deletions
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);
}
|