ChatEventMap

chat events

interface ChatEventMap {
  'cnl:config': { config: ChatConfig; senderId: string };
  'cnl:create': { config: ChatConfig; senderId: string };
  'cnl:delete': { reason?: string; senderId: string };
  message: Message;
  'user:add': { users: User[] };
  'user:del': { senderId: string; users: string[] };
  'user:join': { user: User };
  'user:left': { userId: string };
  'user:mod': { senderId: string; users: User[] };
}

index

Properties

cnl:config

config updated

{ config: ChatConfig; senderId: string;  }

cnl:create

user created channel, event sent to initial users in channel to join call

{ config: ChatConfig; senderId: string;  }

cnl:delete

channel deleted

{ reason?: string; senderId: string;  }

message

new message

Message

user:add

users were added to call

{ users: User[];  }

user:del

call user delete

{ senderId: string; users: string[];  }

user:join

a user joined call, may not have published tracks yet

{ user: User;  }

user:left

a user left call

{ userId: string;  }

user:mod

user moderated

{ senderId: string; users: User[];  }