From bdbafd936bdd9ed965f52882e7f82acbd2ecb79b Mon Sep 17 00:00:00 2001 From: smail Date: Sun, 6 Sep 2026 07:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=8D=E5=88=B6=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E5=90=8E=E7=9A=84=E9=BB=98=E8=AE=A4=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E5=BD=92=E5=B1=9E=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/services/group/group.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/services/group/group.go b/backend/services/group/group.go index 93c2da1..ba74749 100644 --- a/backend/services/group/group.go +++ b/backend/services/group/group.go @@ -781,7 +781,11 @@ func Move2DefaultBox(ctx *context.Context, mailIDs []int, groupName string) erro rollbackGroupTransaction(session) return fmt.Errorf("load default mailbox move ownership: %w", err) } - if len(relations) != len(uniqueIDs) { + ownedEmailIDs := make(map[int]struct{}, len(relations)) + for _, relation := range relations { + ownedEmailIDs[relation.EmailID] = struct{}{} + } + if len(ownedEmailIDs) != len(uniqueIDs) { rollbackGroupTransaction(session) return errors2.New("one or more messages are not owned by the user") }