Skip to content

Commit a579397

Browse files
committed
add call reject
1 parent 64bc969 commit a579397

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

call.go

+5
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ func (cli *Client) handleCallEvent(node *waBinary.Node) {
8383
Reason: cag.String("reason"),
8484
Data: &child,
8585
})
86+
case "reject":
87+
cli.dispatchEvent(&events.CallReject{
88+
BasicCallMeta: basicMeta,
89+
Data: &child,
90+
})
8691
default:
8792
cli.dispatchEvent(&events.UnknownCallEvent{Node: node})
8893
}

types/events/call.go

+6
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ type CallTerminate struct {
6565
Data *waBinary.Node
6666
}
6767

68+
// CallReject is sent when the other party rejects the call on WhatsApp.
69+
type CallReject struct {
70+
types.BasicCallMeta
71+
Data *waBinary.Node
72+
}
73+
6874
// UnknownCallEvent is emitted when a call element with unknown content is received.
6975
type UnknownCallEvent struct {
7076
Node *waBinary.Node

0 commit comments

Comments
 (0)