From 31089097a866d9fca9c6e584f56abec74ce83312 Mon Sep 17 00:00:00 2001 From: Sagleft Date: Wed, 15 Feb 2023 12:31:38 +0200 Subject: [PATCH] add `WsSubscribe` to client interface --- v2/messenger.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/v2/messenger.go b/v2/messenger.go index 47a965d..93b6ded 100644 --- a/v2/messenger.go +++ b/v2/messenger.go @@ -3,6 +3,7 @@ package utopiago import ( "github.com/Sagleft/utopialib-go/v2/internal/utopia" "github.com/Sagleft/utopialib-go/v2/pkg/structs" + "github.com/Sagleft/utopialib-go/v2/pkg/websocket" ) type Client interface { @@ -49,6 +50,10 @@ type Client interface { // SetWebSocketState - set WSS Notification state SetWebSocketState(task structs.SetWsStateTask) error + // WsSubscribe - connect to websocket & receive messages. + // NOTE: it's blocking method + WsSubscribe(task websocket.WsSubscribeTask) error + // SendChannelMessage - send channel message & get message ID SendChannelMessage(channelID, message string) (string, error)