@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
12 lines (10 loc) • 532 B
text/typescript
import { CometChat } from '@cometchat/chat-sdk-react-native';
import { MessageCategoryConstants, streamMessageTypes } from '../constants/UIKitConstants';
export class StreamMessage extends CometChat.AIAssistantMessage {
constructor(receiverId: string, receiverType: string, text: string, category?: string) {
super(receiverId, receiverType);
this.setType(streamMessageTypes.run_started);
this.category = (category ?? MessageCategoryConstants.stream) as CometChat.MessageCategory;
(this as any).text = text;
}
}