ChannelEvent.message constructor
ChannelEvent.message({
- required String id,
- required ConversationKey conversation,
- required String text,
- String? userId,
- String? userName,
- DateTime? timestamp,
- List<
ChannelAttachment> ? attachments, - Map<
String, dynamic> ? metadata,
Create a message event.
Implementation
factory ChannelEvent.message({
required String id,
required ConversationKey conversation,
required String text,
String? userId,
String? userName,
DateTime? timestamp,
List<ChannelAttachment>? attachments,
Map<String, dynamic>? metadata,
}) {
return ChannelEvent(
id: id,
conversation: conversation,
type: 'message',
text: text,
userId: userId,
userName: userName,
timestamp: timestamp ?? DateTime.now(),
attachments: attachments,
metadata: metadata,
);
}