From eb77ecbeb72a437c862523e6fa019c2337a7a8d3 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 23 Aug 2024 19:36:11 +0800 Subject: [PATCH] :bug: Fix user id need isn't pointer in stream request --- pkg/internal/services/websocket.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/internal/services/websocket.go b/pkg/internal/services/websocket.go index 8b0f7a0..3517377 100644 --- a/pkg/internal/services/websocket.go +++ b/pkg/internal/services/websocket.go @@ -2,6 +2,7 @@ package services import ( "context" + "github.com/samber/lo" "time" "git.solsynth.dev/hydrogen/dealer/pkg/proto" @@ -15,7 +16,7 @@ func PushCommand(userId uint, task models.UnifiedCommand) { pc := gap.H.GetDealerGrpcConn() _, _ = proto.NewStreamControllerClient(pc).PushStream(ctx, &proto.PushStreamRequest{ - UserId: uint64(userId), + UserId: lo.ToPtr(uint64(userId)), Body: task.Marshal(), }) }