Skip to main content

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

NameTypeRequiredDescription
RejectboolReject the suggested post.
PeerInputPeerClassyesBoth 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).
MsgIDintyesID of the suggestion message.
ScheduleDateintCustom scheduling date.
RejectCommentstringOptional comment for rejections (can only be used if reject is set).

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.

References