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
| Name | Type | Required | Description |
|---|---|---|---|
SignaturesEnabled | bool | — | If set, enables message signatures. |
ProfilesEnabled | bool | — | If 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. |
Channel | InputChannelClass | yes | Channel |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | CHAT_ID_INVALID | The provided chat id is invalid. |
| 400 | CHAT_NOT_MODIFIED | No changes were made to chat information because the new information you passed is identical to the current information. |
References
- Official documentation
- Generated Go reference
- TL definition:
channels.toggleSignatures#418d549c