mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix(keystone): avoid repeated abnormal login notifications
This commit is contained in:
@@ -112,6 +112,8 @@ func (sql *SSQLDriver) alertNotify(ctx context.Context, uext *api.SUserExtended,
|
||||
userSet := sets.NewString(daUserIds...)
|
||||
userSet.Insert(aUserIds...)
|
||||
data.Set("admin", jsonutils.JSONTrue)
|
||||
// prevent duplicate messages
|
||||
userSet.Delete(uext.Id)
|
||||
p.RecipientId = userSet.UnsortedList()
|
||||
p.Data = data
|
||||
notifyclient.NotifyWithTag(ctx, p)
|
||||
|
||||
Reference in New Issue
Block a user