From ea94fd7b540eacbdf2bf9fdf86e523250b036b8b Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 23 Aug 2024 23:00:49 +0800 Subject: [PATCH] :bug: Fix broadcast typing status to wrong user --- pkg/internal/services/status.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/internal/services/status.go b/pkg/internal/services/status.go index e97420c..829b8a8 100644 --- a/pkg/internal/services/status.go +++ b/pkg/internal/services/status.go @@ -53,13 +53,14 @@ func SetTypingStatus(channelId uint, userId uint) error { var channel models.Channel if err := database.C. Preload("Members"). + Preload("Members.Account"). Where("id = ?", channelId). First(&channel).Error; err != nil { return fmt.Errorf("channel not found: %v", err) } for _, item := range channel.Members { - broadcastTarget = append(broadcastTarget, uint64(item.AccountID)) + broadcastTarget = append(broadcastTarget, uint64(item.Account.ExternalID)) } data = map[string]any{