Update dependencies and build to go1.22 (#2113)

* Update dependencies and build to go1.22

* Fix api changes wrt to dependencies

* Update golangci config
This commit is contained in:
Wim
2024-05-23 23:44:31 +02:00
committed by GitHub
parent 56e7bd01ca
commit 2f33fe86f5
1556 changed files with 3279522 additions and 1924375 deletions

View File

@@ -8,7 +8,6 @@ package whatsmeow
import (
"fmt"
"sync/atomic"
waBinary "go.mau.fi/whatsmeow/binary"
"go.mau.fi/whatsmeow/types"
@@ -66,9 +65,9 @@ func (cli *Client) SendPresence(state types.Presence) error {
return ErrNoPushName
}
if state == types.PresenceAvailable {
atomic.CompareAndSwapUint32(&cli.sendActiveReceipts, 0, 1)
cli.sendActiveReceipts.CompareAndSwap(0, 1)
} else {
atomic.CompareAndSwapUint32(&cli.sendActiveReceipts, 1, 0)
cli.sendActiveReceipts.CompareAndSwap(1, 0)
}
return cli.sendNode(waBinary.Node{
Tag: "presence",