Hiyve Components - v1.0.0
    Preparing search index...

    Interface ChatMessage

    Chat message in a video conference room.

    Represents a single chat message. Messages can be from participants, the local user, or system-generated (e.g., "User joined the room").

    Rendering chat messages:

    function ChatBubble({ message }: { message: ChatMessage }) {
    if (message.isSystem) {
    return <Text style={styles.system}>{message.content}</Text>;
    }

    return (
    <View style={message.isLocal ? styles.sent : styles.received}>
    <Text style={styles.sender}>{message.userName || message.userId}</Text>
    <Text>{message.content}</Text>
    </View>
    );
    }

    ChatState for the chat state container

    interface ChatMessage {
        content: string;
        externalUserId?: string;
        id: string;
        isLocal?: boolean;
        isSystem?: boolean;
        timestamp: Date;
        userId: string;
        userName?: string;
    }
    Index

    Properties

    content: string

    Message content/text

    externalUserId?: string

    External user ID of the sender

    id: string

    Unique message identifier

    isLocal?: boolean

    Whether this message was sent by the local user

    isSystem?: boolean

    Whether this is a system-generated message

    timestamp: Date

    When the message was sent

    userId: string

    User ID of the sender (or 'system' for system messages)

    userName?: string

    Display name of the sender