eion/purple-hangouts

83eae02d0b16
Parents 55331a843477
Children 8c8714002f4d
Skip over join/part messages when replaying history
Fixes issue #150
--- a/hangouts_conversation.c Sat Jul 15 11:24:25 2017 +1200
+++ b/hangouts_conversation.c Tue Aug 01 08:56:36 2017 +1200
@@ -498,8 +498,12 @@
for (i = 0; i < response->conversation_state->n_event; i++) {
Event *event = response->conversation_state->event[i];
- //Send event to the hangouts_events.c slaughterhouse
- hangouts_process_conversation_event(ha, conversation, event, response->response_header->current_server_time);
+
+ // Ignore join/parts when loading history
+ if (!event->membership_change) {
+ //Send event to the hangouts_events.c slaughterhouse
+ hangouts_process_conversation_event(ha, conversation, event, response->response_header->current_server_time);
+ }
}
}