messages.toggleSuggestedPostApproval
Approve or reject a suggested post ».
func (c *Client) MessagesToggleSuggestedPostApproval(ctx context.Context, request *MessagesToggleSuggestedPostApprovalRequest) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesToggleSuggestedPostApproval(ctx, &tg.MessagesToggleSuggestedPostApprovalRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Reject | bool | — | Reject the suggested post. |
Peer | InputPeerClass | yes | Both for users and channels, must contain the ID of the direct messages monoforum » (for channels, the topic ID is extracted automatically from the msg_id). |
MsgID | int | yes | ID of the suggestion message. |
ScheduleDate | int | — | Custom scheduling date. |
RejectComment | string | — | Optional comment for rejections (can only be used if reject is set). |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.toggleSuggestedPostApproval#8107455c