From d464f18fbdc0220852d5681bc2ab1c5036052736 Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Wed, 15 Jan 2025 15:36:20 +0800 Subject: [PATCH] feat: add GetGroupMemberList function to actionManager for retrieving group member IDs and initiate websocket communication --- action/action.go | 12 ++++++++++++ handler/steamplaying/service.go | 1 + 2 files changed, 13 insertions(+) diff --git a/action/action.go b/action/action.go index 163f8bd..6d31461 100644 --- a/action/action.go +++ b/action/action.go @@ -55,3 +55,15 @@ func (am *actionManager) DrawbackMsg(msgId int32) error { } return nil } + +func (am *actionManager) GetGroupMemberList(groupId int64) ([]int64, error) { + askGroupMemberListPkg := model.GenGetGroupMemberListPkg(groupId) + askGroupMemberListPkgJson, err := json.Marshal(askGroupMemberListPkg) + if err != nil { + return nil, err + } + if err = am.botConn.WriteMessage(websocket.TextMessage, askGroupMemberListPkgJson); err != nil { + return nil, err + } + return nil, nil //todo +} diff --git a/handler/steamplaying/service.go b/handler/steamplaying/service.go index 85b2911..128c1fc 100644 --- a/handler/steamplaying/service.go +++ b/handler/steamplaying/service.go @@ -154,6 +154,7 @@ func getSteamUser(qqid int64) (SteamUser, error) { } func getSteamUsersInGroup(groupID int64) ([]SteamUserForGroup, error) { + // allUserInGroup, err := action. tx, err := sqlite3.GetTran() if err != nil { return nil, err