The server delivers channel status updates as <status> stanzas. Without a registered node handler they were dropped unacked, so the server redelivered them on every connect and closed the stream every 50 minutes with <stream:error><ack class="status" .../></stream:error>.
23 lines
784 B
Go
23 lines
784 B
Go
// Copyright (c) 2026 Tulir Asokan
|
|
//
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package whatsmeow
|
|
|
|
import (
|
|
"context"
|
|
|
|
waBinary "go.mau.fi/whatsmeow/binary"
|
|
)
|
|
|
|
// handleStatusUpdate acknowledges <status> stanzas (channel status updates).
|
|
// The content isn't parsed into events yet, but the stanza must be acked:
|
|
// otherwise the server redelivers it on every connect and recycles the
|
|
// connection every 50 minutes with
|
|
// <stream:error><ack class="status" id="..." type="..."/></stream:error>.
|
|
func (cli *Client) handleStatusUpdate(ctx context.Context, node *waBinary.Node) {
|
|
defer cli.maybeDeferredAck(ctx, node)()
|
|
}
|