MediaSFU Angular
    Preparing search index...

    Class ReceiveMessage

    Service for receiving and processing messages, including handling group and direct messages, filtering banned senders, and updating message states.

    ReceiveMessage

    Manages incoming messages, appends them to the existing messages array, filters out banned senders, and updates message badge visibility as needed.

    receiveMessage

    Options for handling a received message:

    • message {Message}: The new message object to process.
    • messages {Message[]}: The current list of messages.
    • participantsAll {Participant[]}: All participants in the chat.
    • member {string}: The current member's name.
    • eventType {EventType}: The type of event (e.g., "broadcast" or "chat").
    • islevel {string}: The level of the current user.
    • coHost {string}: The name of the co-host.
    • updateMessages {Function}: A function to update the messages list.
    • updateShowMessagesBadge {Function}: A function to toggle the visibility of the message badge.

    Resolves when the message processing and updates are complete.

    const message = { sender: 'Alice', receivers: ['Bob'], message: 'Hello!', timestamp: Date.now(), group: false };
    const options = {
    message,
    messages: [],
    participantsAll: [{ name: 'Alice' }, { name: 'Bob' }],
    member: 'Bob',
    eventType: 'chat',
    islevel: '1',
    coHost: 'Charlie',
    updateMessages: (updatedMessages) => console.log('Messages updated:', updatedMessages),
    updateShowMessagesBadge: (show) => console.log('Show badge:', show)
    };
    receiveMessageService.receiveMessage(options);
    Index

    Constructors

    Methods

    Constructors

    Methods