The moderation event with both/either peer number set to invalid should not be fired, if we already had the exact same list loaded. (by hash, which is part of the rarely changing shared state, which is signed by the founder)
|
c->moderation(c->messenger, chat->group_number, gc_invalid_peer_id(), gc_invalid_peer_id(), MV_MOD, userdata); |
Also maybe avoid unpacking the list if we know we already have the same.
|
static int validate_unpack_mod_list(GC_Chat *_Nonnull chat, const uint8_t *_Nonnull data, uint16_t length, uint16_t num_mods) |
The moderation event with both/either peer number set to invalid should not be fired, if we already had the exact same list loaded. (by hash, which is part of the rarely changing shared state, which is signed by the founder)
c-toxcore/toxcore/group_chats.c
Line 3038 in daddc7f
Also maybe avoid unpacking the list if we know we already have the same.
c-toxcore/toxcore/group_chats.c
Line 2983 in daddc7f