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:
5
vendor/go.mau.fi/whatsmeow/presence.go
vendored
5
vendor/go.mau.fi/whatsmeow/presence.go
vendored
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user