修改房间编号为string

This commit is contained in:
ayflying
2025-04-23 18:22:38 +08:00
parent 569937c67f
commit c24ac78b91

View File

@@ -37,7 +37,7 @@ type WebsocketData struct {
Uid int64 `json:"uid" dc:"用户编号"` Uid int64 `json:"uid" dc:"用户编号"`
Groups []string `json:"groups" dc:"群组"` Groups []string `json:"groups" dc:"群组"`
Ctx context.Context `json:"ctx" dc:""` Ctx context.Context `json:"ctx" dc:""`
RoomId int `json:"roomId" dc:"房间编号"` RoomId string `json:"roomId" dc:"房间编号"`
} }
func NewV1() *SocketV1 { func NewV1() *SocketV1 {
@@ -100,7 +100,7 @@ func (s *SocketV1) OnConnect(ctx context.Context, ws *websocket.Conn) {
Ws: ws, Ws: ws,
Ctx: ctx, Ctx: ctx,
Groups: make([]string, 0), Groups: make([]string, 0),
RoomId: -1, RoomId: "",
} }
m.Set(id, conn) m.Set(id, conn)