From 73f600d9a6b6bbd2d27233e186d1f773714e1c9a Mon Sep 17 00:00:00 2001 From: Sagleft Date: Sat, 29 Oct 2022 03:39:49 +0300 Subject: [PATCH] add `ToogleChannelNotifications` method --- client.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client.go b/client.go index e6fe656..c781b8b 100644 --- a/client.go +++ b/client.go @@ -524,3 +524,15 @@ func (c *UtopiaClient) GetChannels(task GetChannelsTask) ([]SearchChannelData, e return data, nil } + +func (c *UtopiaClient) ToogleChannelNotifications(channelID string, enabled bool) error { + params := map[string]interface{}{ + "channelid": channelID, + "enabled": enabled, + } + + if _, err := c.queryResultToBool("enableChannelNotification", params); err != nil { + return err + } + return nil +}