Interface ServiceMessage

interface ServiceMessage {
    business_connection_id?: string;
    chat: Chat;
    date: number;
    from?: User;
    is_topic_message?: boolean;
    message_id: number;
    message_thread_id?: number;
    sender_chat?: Chat;
}

Hierarchy (view full)

Properties

business_connection_id?: string

Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.

chat: Chat

Chat the message belongs to

date: number

Date the message was sent in Unix time. It is always a positive number, representing a valid date.

from?: User

Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats

is_topic_message?: boolean

True, if the message is sent to a forum topic

message_id: number

Unique message identifier inside this chat

message_thread_id?: number

Unique identifier of a message thread or a forum topic to which the message belongs; for supergroups only

sender_chat?: Chat

Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.