From 4eae34b58b9f6df2b80f0cc29035645a1af8710d Mon Sep 17 00:00:00 2001 From: devinwang Date: Mon, 17 Jun 2024 13:38:31 +1200 Subject: [PATCH] fix: set the state parameter to true while querying a channel --- channel.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/channel.go b/channel.go index bb1c5c3..edf0194 100644 --- a/channel.go +++ b/channel.go @@ -198,6 +198,12 @@ func (q QueryResponse) updateChannel(ch *Channel) { // Query makes request to channel api and updates channel internal state. func (ch *Channel) Query(ctx context.Context, q *QueryRequest) (*QueryResponse, error) { + if q != nil { + q.State = true + } else { + q = &QueryRequest{State: true} + } + p := path.Join("channels", url.PathEscape(ch.Type), url.PathEscape(ch.ID), "query") var resp QueryResponse