eion/purple-hangouts

Parents 879cd690d7d4
Children f9f5032acb6b
If a message is too old, don't make Pidgin beep/flash the conversation window
Fixes lock-ups when there's a lot of history downloaded all at once
--- a/hangouts_events.c Thu Oct 20 07:23:23 2016 +0000
+++ b/hangouts_events.c Thu Oct 20 20:32:14 2016 +1300
@@ -627,6 +627,9 @@
msg = purple_xmlnode_to_str(html, NULL);
message_timestamp = time(NULL) - ((current_server_time - timestamp) / 1000000);
msg_flags = (g_strcmp0(gaia_id, ha->self_gaia_id) ? PURPLE_MESSAGE_RECV : PURPLE_MESSAGE_SEND);
+ if (((current_server_time - timestamp) / 1000000) < 30) {
+ msg_flags |= PURPLE_MESSAGE_NOTIFY;
+ }
if (g_hash_table_contains(ha->group_chats, conv_id)) {
PurpleChatConversation *chatconv = purple_conversations_find_chat_with_account(conv_id, ha->account);