Skip to main content

channels.toggleSignatures

Enable/disable message signatures in channels

func (c *Client) ChannelsToggleSignatures(ctx context.Context, request *ChannelsToggleSignaturesRequest) (UpdatesClass, error)

Calling this method

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

res, err := api.ChannelsToggleSignatures(ctx, &tg.ChannelsToggleSignaturesRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
SignaturesEnabledboolIf set, enables message signatures.
ProfilesEnabledboolIf set, messages from channel admins will link to their profiles, just like for group messages: can only be set if the signatures_enabled flag is set.
ChannelInputChannelClassyesChannel

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400CHAT_ID_INVALIDThe provided chat id is invalid.
400CHAT_NOT_MODIFIEDNo changes were made to chat information because the new information you passed is identical to the current information.

References