Skip to main content

messages.getOutboxReadDate

Get the exact read date of one of our messages, sent to a private chat with another user. Can be only done for private outgoing messages not older than appConfig pm_read_date_expire_period ». If the peer's userFull.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted. The exact read date of messages might still be unavailable for other reasons, see here » for more info. To set userFull.read_dates_private for ourselves invoke account setGlobalPrivacySettings, setting the settings.hide_read_marks flag.

func (c *Client) MessagesGetOutboxReadDate(ctx context.Context, request *MessagesGetOutboxReadDateRequest) (*OutboxReadDate, error)

Calling this method

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

res, err := api.MessagesGetOutboxReadDate(ctx, &tg.MessagesGetOutboxReadDateRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *OutboxReadDate
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesThe user to whom we sent the message.
MsgIDintyesThe message ID.

Returns

*OutboxReadDate

Possible errors

CodeTypeDescription
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400MESSAGE_NOT_READ_YETThe specified message wasn't read yet.
400MESSAGE_TOO_OLDThe message is too old, the requested information is not available.
400PEER_ID_INVALIDThe provided peer id is invalid.
403USER_PRIVACY_RESTRICTEDThe user's privacy settings do not allow you to do this.
403YOUR_PRIVACY_RESTRICTEDYou cannot fetch the read date of this message because you have disallowed other users to do so for your messages; to fix, allow other users to see your exact last online date OR purchase a Telegram Premium subscription.

References