sendCustomMessage method
Description Send targeted custom messages to some members of the chat room
- Parameters:
- userIds: userIds description
- roomId:
UserId
- eventType: A constant String value that identifies the type of event.
- infoMap: Extended Information
- completion: Send callback,what if success or error.
Implementation
@override
Future<void> sendCustomMessage({
required String roomId,
required String event,
Map<String, String>? params,
List<String>? receiver,
}) async {
final msg = Message.createCustomSendMessage(
targetId: roomId,
event: event,
params: params,
chatType: ChatType.ChatRoom,
);
msg.addUserEntity();
if (receiver?.isNotEmpty == true) {
msg.receiverList = receiver;
}
Client.getInstance.chatManager.sendMessage(msg);
}