Layer 220
method Users
messages.saveDefaultSendAs#ccfddf96 peer:InputPeer send_as:InputPeer = Bool;

Parameters

Name Type Description
Peer InputPeer Group
SendAs InputPeer The default peer that should be used when sending messages to the group

Returns

Bool

Possible Errors

Code Type Description
400 CHANNEL_INVALID The provided channel is invalid.
400 PEER_ID_INVALID The provided peer id is invalid.
400 SEND_AS_PEER_INVALID You can't send messages as the specified peer.

Gogram Example

// MessagesSaveDefaultSendAs - positional arguments
result, err := client.MessagesSaveDefaultSendAs(&tg.InputPeerUser{UserID: int64(123456789)}, &tg.InputPeerUser{UserID: int64(123456789)})
if err != nil {
    // handle error
}
// result is *tg.Bool