From 179c01c0e46e99d794bbba4717b143e37fd74455 Mon Sep 17 00:00:00 2001 From: mlogclub Date: Tue, 21 Apr 2026 17:36:33 +0800 Subject: [PATCH] feat(wxwork): update default recipients to remove duplicates and include all users --- internal/services/wxwork_notify_service_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/services/wxwork_notify_service_test.go b/internal/services/wxwork_notify_service_test.go index 96ab484..bc30ae6 100644 --- a/internal/services/wxwork_notify_service_test.go +++ b/internal/services/wxwork_notify_service_test.go @@ -19,14 +19,14 @@ func TestWxWorkNotifyDefaultRecipients(t *testing.T) { WxWork: config.WxWorkConfig{ Notify: config.WxWorkNotifyConfig{ Enabled: true, - ToUsers: []string{" user_a ", "user_a", ""}, + ToUsers: []string{"user_a", "user_a", "user_b"}, }, }, }) svc := newWxWorkNotifyService() recipients := svc.defaultRecipients() - if len(recipients.ToUsers) != 1 || recipients.ToUsers[0] != "user_a" { + if len(recipients.ToUsers) != 2 || recipients.ToUsers[0] != "user_a" || recipients.ToUsers[1] != "user_b" { t.Fatalf("unexpected users: %#v", recipients.ToUsers) } }