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
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | The user to whom we sent the message. |
MsgID | int | yes | The message ID. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | MESSAGE_ID_INVALID | The provided message id is invalid. |
| 400 | MESSAGE_NOT_READ_YET | The specified message wasn't read yet. |
| 400 | MESSAGE_TOO_OLD | The message is too old, the requested information is not available. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 403 | USER_PRIVACY_RESTRICTED | The user's privacy settings do not allow you to do this. |
| 403 | YOUR_PRIVACY_RESTRICTED | You 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
- Official documentation
- Generated Go reference
- TL definition:
messages.getOutboxReadDate#8c4bfe5d