Interface GetChatMessagePosition

Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat. Cannot be used in secret chats. Request type for Tdjson#getChatMessagePosition.

interface GetChatMessagePosition {
    @type: "getChatMessagePosition";
    chat_id: number;
    filter: SearchMessagesFilter;
    message_id: number;
    message_thread_id: number;
    saved_messages_topic_id: number;
}

Properties

@type: "getChatMessagePosition"
chat_id: number

Identifier of the chat in which to find message position.

Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function.

message_id: number

Message identifier.

message_thread_id: number

If not 0, only messages in the specified thread will be considered; supergroups only.

saved_messages_topic_id: number

If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all relevant messages, or for chats other than Saved Messages.