Layer 220
method Users
phone.discardCall#b2cbc1c0 flags:# video:flags.0?true peer:InputPhoneCall duration:int reason:PhoneCallDiscardReason connection_id:long = Updates;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
Video flags.0?true Whether this is a video call
Peer InputPhoneCall The phone call
Duration int Call duration
Reason PhoneCallDiscardReason Why was the call discarded
ConnectionId long Preferred libtgvoip relay ID

Returns

Updates

Possible Errors

Code Type Description
400 CALL_ALREADY_ACCEPTED The call was already accepted.
500 CALL_OCCUPY_FAILED The call failed because the user is already making another call.
400 CALL_PEER_INVALID The provided call peer object is invalid.

Gogram Example

// PhoneDiscardCall - using Params struct
result, err := client.PhoneDiscardCall(&tg.PhoneDiscardCallParams{
    Peer: &tg.InputPhoneCall{},
    Duration: 0,
    Reason: &tg.PhoneCallDiscardReason{},
    ConnectionId: int64(0),

    // Optional fields:
    // Video: true,
})
if err != nil {
    // handle error
}
// result is *tg.Updates