diff --git a/core/group_chat.go b/core/group_chat.go index 094b061..78b3cd9 100644 --- a/core/group_chat.go +++ b/core/group_chat.go @@ -109,7 +109,7 @@ func (gc *groupChat) ClientConnected(conn *websocket.Conn, callby *wshandler.Sen gc.rh.JSONSet(callby.Accid.Hex(), "$.channel", map[string]any{}) } -func (gc *groupChat) ClientDisconnected(conn *websocket.Conn, callby *wshandler.Sender) { +func (gc *groupChat) ClientDisconnected(msg string, callby *wshandler.Sender) { docs, _ := gc.rh.JSONGetDocuments(callby.Accid.Hex(), "$.channel") if len(docs) > 0 { diff --git a/core/group_instant.go b/core/group_instant.go index cb89fde..40dc77d 100644 --- a/core/group_instant.go +++ b/core/group_instant.go @@ -6,7 +6,6 @@ import ( "net/http" "github.com/go-redis/redis/v8" - "github.com/gorilla/websocket" "repositories.action2quare.com/ayo/gocommon" "repositories.action2quare.com/ayo/gocommon/logger" "repositories.action2quare.com/ayo/gocommon/wshandler" @@ -470,7 +469,7 @@ func (gi *groupInstant) find(id groupID) (*instantDoc, error) { }, nil } -func (gi *groupInstant) ClientDisconnected(conn *websocket.Conn, callby *wshandler.Sender) { +func (gi *groupInstant) ClientDisconnected(msg string, callby *wshandler.Sender) { gids, _ := gi.rh.JSONGetString(callby.Accid.Hex(), "$.instant.id") if len(gids) > 0 && len(gids[0]) > 0 { diff --git a/core/tavern.go b/core/tavern.go index 3e330ac..9e92fa6 100644 --- a/core/tavern.go +++ b/core/tavern.go @@ -143,7 +143,7 @@ func (tv *Tavern) ClientConnected(conn *websocket.Conn, callby *wshandler.Sender } } -func (tv *Tavern) ClientDisconnected(conn *websocket.Conn, callby *wshandler.Sender) { +func (tv *Tavern) ClientDisconnected(msg string, callby *wshandler.Sender) { tv.redison.Del(tv.redison.Context(), callby.Accid.Hex()).Result() }