Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/pidgin-opensteamworks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2015-08-25 00:56:26 +0300
committerEion Robb <eion@robbmob.com>2015-08-25 00:56:26 +0300
commit8fbede83cf41817554f304ffff4634d7b6cd4799 (patch)
treeb25d2777939cccbd66623ad94ec30f2edc0fed47
parentd82ca98e938e5138800b8a7f97e70c50af19ecc9 (diff)
Improve offline history support by not repeating history if we haven't received a message in the current session
-rw-r--r--steam-mobile/libsteam.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/steam-mobile/libsteam.c b/steam-mobile/libsteam.c
index ac04e3d..f2a4fa8 100644
--- a/steam-mobile/libsteam.c
+++ b/steam-mobile/libsteam.c
@@ -890,6 +890,8 @@ steam_get_offline_history_cb(SteamAccount *sa, JsonObject *obj, gpointer user_da
} else {
serv_got_im(sa->pc, who, text, PURPLE_MESSAGE_RECV, timestamp);
}
+
+ sa->last_message_timestamp = timestamp;
}
g_free(who);
@@ -1418,6 +1420,9 @@ static void steam_close(PurpleConnection *pc)
purple_timeout_remove(sa->poll_timeout);
purple_timeout_remove(sa->watchdog_timeout);
+ if (sa->last_message_timestamp > 0)
+ purple_account_set_int(sa->account, "last_message_timestamp", sa->last_message_timestamp);
+
purple_debug_info("steam", "destroying %d waiting connections\n",
g_queue_get_length(sa->waiting_conns));