eion/purple-hangouts

Parents 12ef9a48bd5a
Children 7df90d65f172
Add setting to control whether image history is fetched when opening group chats

Fetching is enabled by default to retain old behavior - it must be explicitly disabled.
--- a/hangouts_conversation.c Wed Feb 27 23:36:29 2019 +1300
+++ b/hangouts_conversation.c Sun Mar 03 13:21:54 2019 -0500
@@ -529,6 +529,10 @@
// Ignore join/parts when loading history
if (!event->membership_change) {
+ if(event->chat_message != NULL && event->chat_message->message_content->n_attachment && !purple_account_get_bool(ha->account, "fetch_image_history", TRUE)) {
+ purple_debug_info("hangouts", "skipping attachment due to fetch_image_history disabled\n");
+ continue;
+ }
//Send event to the hangouts_events.c slaughterhouse
hangouts_process_conversation_event(ha, conversation, event, response->response_header->current_server_time);
}
--- a/libhangouts.c Wed Feb 27 23:36:29 2019 +1300
+++ b/libhangouts.c Sun Mar 03 13:21:54 2019 -0500
@@ -92,6 +92,9 @@
option = purple_account_option_bool_new(N_("Hide self from buddy list (requires reconnect)"), "hide_self", FALSE);
account_options = g_list_append(account_options, option);
+
+ option = purple_account_option_bool_new(N_("Fetch image history when opening group chats"), "fetch_image_history", TRUE);
+ account_options = g_list_append(account_options, option);
return account_options;
}