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

    Represents a chat message in the ChatPanel.

    This interface contains all the data needed to display a message in the chat panel, including sender information and message type.

    const messages: ChatMessage[] = [
    {
    id: 'msg-1',
    userId: 'user-123',
    userName: 'John Doe',
    content: 'Hello everyone!',
    timestamp: new Date(),
    isLocal: true,
    },
    {
    id: 'msg-2',
    userId: 'system',
    content: 'Jane Smith joined the room',
    timestamp: new Date(),
    isSystem: true,
    },
    ];
    interface ChatMessage {
        content: string;
        id: string;
        isLocal?: boolean;
        isSystem?: boolean;
        timestamp: string | Date;
        userId: string;
        userName?: string;
    }
    Index

    Properties

    content: string

    Message content (plain text)

    id: string

    Unique identifier for the message

    isLocal?: boolean

    Whether this message is from the local user

    isSystem?: boolean

    Whether this is a system message (e.g., "User joined")

    timestamp: string | Date

    Timestamp when message was sent

    userId: string

    User ID of the sender

    userName?: string

    Display name of the sender