Skip to main content

messages.readSavedHistory

Mark messages as read in a monoforum topic ».

func (c *Client) MessagesReadSavedHistory(ctx context.Context, request *MessagesReadSavedHistoryRequest) (bool, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesReadSavedHistory(ctx, &tg.MessagesReadSavedHistoryRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
ParentPeerInputPeerClassyesID of the monoforum group.
PeerInputPeerClassyesID of the topic.
MaxIDintyesIf a positive value is passed, only messages with identifiers less or equal than the given one will be read.

Returns

bool

Possible errors

CodeTypeDescription
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400PARENT_PEER_INVALIDThe specified parent_peer is invalid.

References