The options for sending a message.
OptionaleventType?: EventTypeOptionalshowAlert?: ShowAlertA promise that resolves when the message is sent.
Will show an alert if the message count exceeds the limit, if the message is invalid, or if the user is not allowed to send a message.
await sendMessage({
message: "Hello, World!",
receivers: ["user1", "user2"],
group: true,
messagesLength: 50,
member: "user3",
sender: "user3",
islevel: "2",
eventType: "chat",
showAlert: ({ message, type }) => console.log(message, type),
coHostResponsibility: [{ name: "chat", value: true }],
coHost: "coHostUser",
roomName: "mainRoom",
socket: socketInstance,
chatSetting: "allow",
});
Sends a message to the server.