@avaya/infinity-agent-sdk - v1.0.0
    Preparing search index...

    Interface InteractionMessageReceivedEvent

    Emitted when a message is received on this interaction. The message may have been authored by another viewer/owner or generated by the server as a system notification - narrow on event.payload.message.author.type to disambiguate. Inspect event.payload.message.isPrivate to tell private (viewer-only) messages apart from customer-visible ones.

    interaction.subscribe(InteractionEventType.INTERACTION_MESSAGE_RECEIVED, (event) => {
    const { message } = event.payload;
    if (message.author.type === MessageAuthorType.AGENT) {
    console.log(`${message.author.details.displayName}: ${message.body.text.content}`);
    } else {
    console.log(`[system] ${message.body.text.content}`);
    }
    });
    interface InteractionMessageReceivedEvent {
        type: INTERACTION_MESSAGE_RECEIVED;
        payload: InteractionMessageReceivedPayload;
        occurredAt: Date;
    }

    Hierarchy (View Summary)

    Index

    Properties

    The event type identifier.

    The event payload containing event-specific data.

    occurredAt: Date

    The timestamp when the event occurred.