phone.receivedCall
Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended, see here » for more info on the full flow.
func (c *Client) PhoneReceivedCall(ctx context.Context, peer InputPhoneCall) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PhoneReceivedCall(ctx, peer)
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPhoneCall | yes | The phone call we're currently in |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CALL_ALREADY_DECLINED | The call was already declined. |
| 400 | CALL_PEER_INVALID | The provided call peer object is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
phone.receivedCall#17d54f61