interface GroupEventTypes {
    group.participant_changed: {
        action:
            | "add"
            | "remove"
            | "demote"
            | "promote"
            | "leaver"
            | "join";
        author?: string;
        authorPushName?: string;
        groupId: string;
        operation:
            | "add"
            | "remove"
            | "demote"
            | "promote";
        participants: string[];
    };
}

Properties

group.participant_changed: {
    action:
        | "add"
        | "remove"
        | "demote"
        | "promote"
        | "leaver"
        | "join";
    author?: string;
    authorPushName?: string;
    groupId: string;
    operation:
        | "add"
        | "remove"
        | "demote"
        | "promote";
    participants: string[];
}

Triggered when some member of group has changed

Type declaration

  • action:
        | "add"
        | "remove"
        | "demote"
        | "promote"
        | "leaver"
        | "join"

    The action by member

  • Optionalauthor?: string

    Author of action for add, remove, demote and promote members

  • OptionalauthorPushName?: string

    Author name of action for add, remove, demote and promote members

  • groupId: string

    The group id

  • operation:
        | "add"
        | "remove"
        | "demote"
        | "promote"

    The operation in group

  • participants: string[]

    List of members

WPP.on('group.participant_changed', (event) => {
// Your code
});