sendMessageToParticipant method
Future<void>
sendMessageToParticipant({
- required Participant participant,
- required String path,
- required ChatMessage message,
Implementation
Future<void> sendMessageToParticipant({required Participant participant, required String path, required ChatMessage message}) async {
if (message.text.trim().isNotEmpty || message.attachments.isNotEmpty) {
final tools = [for (final tk in toolkits) (await tk.build(room)).toJson()];
await room.messaging.sendMessage(
to: participant,
type: "chat",
message: {
"tools": tools,
"path": path,
"text": message.text,
"attachments": message.attachments.map((a) => {"path": a}).toList(),
},
);
}
}