channels.readMessageContents
Mark channel/supergroup message contents as read, emitting an updateChannelReadMessagesContents.
func (c *Client) ChannelsReadMessageContents(ctx context.Context, request *ChannelsReadMessageContentsRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.ChannelsReadMessageContents(ctx, &tg.ChannelsReadMessageContentsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Channel | InputChannelClass | yes | Channel/supergroup |
ID | []int | yes | IDs of messages whose contents should be marked as read |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 406 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
References
- Official documentation
- Generated Go reference
- TL definition:
channels.readMessageContents#eab5dc38