Interface GroupEventTypes

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

Properties

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

Triggered when some member of group has changed

Type declaration

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

    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
});