Skip to content

fix: dont fire group moderation event if list did not actually change #3061

Description

@Green-Sky

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low prioritybugBug fix for the user, not a fix to a build script

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions