File tree 4 files changed +802
-26
lines changed
4 files changed +802
-26
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ import (
37
37
)
38
38
39
39
// EventHandler is a function that can handle events from WhatsApp.
40
- type EventHandler func (evt interface {} )
40
+ type EventHandler func (evt any )
41
41
type nodeHandler func (node * waBinary.Node )
42
42
43
43
var nextHandlerID uint32
@@ -778,7 +778,7 @@ func (cli *Client) sendNode(node waBinary.Node) error {
778
778
return err
779
779
}
780
780
781
- func (cli * Client ) dispatchEvent (evt interface {} ) {
781
+ func (cli * Client ) dispatchEvent (evt any ) {
782
782
cli .eventHandlersLock .RLock ()
783
783
defer func () {
784
784
cli .eventHandlersLock .RUnlock ()
Original file line number Diff line number Diff line change @@ -863,7 +863,7 @@ Outer:
863
863
cli .groupParticipantsCache [evt .JID ] = cached
864
864
}
865
865
866
- func (cli * Client ) parseGroupNotification (node * waBinary.Node ) (interface {} , error ) {
866
+ func (cli * Client ) parseGroupNotification (node * waBinary.Node ) (any , error ) {
867
867
children := node .GetChildren ()
868
868
if len (children ) == 1 && children [0 ].Tag == "create" {
869
869
return cli .parseGroupCreate (& children [0 ])
You can’t perform that action at this time.
0 commit comments