Rollback skip push notification changes

This commit is contained in:
LittleSheep 2025-02-03 16:55:23 +08:00
parent f368e047be
commit 1975a89bbb

View File

@ -92,13 +92,10 @@ func NewEvent(event models.Event) (models.Event, error) {
idxList := lo.Map(members, func(item models.ChannelMember, index int) uint64 {
return uint64(item.AccountID)
})
successList64 := PushCommandBatch(idxList, nex.WebSocketPackage{
_ = PushCommandBatch(idxList, nex.WebSocketPackage{
Action: "events.new",
Payload: event,
})
successList := lo.Map(successList64, func(item uint64, index int) uint {
return uint(item)
})
if strings.HasPrefix(event.Type, "messages") {
event.Channel, _ = GetChannel(event.ChannelID)
@ -108,9 +105,7 @@ func NewEvent(event models.Event) (models.Event, error) {
event.Channel.Realm = &realm
}
}
go NotifyMessageEvent(lo.Filter(members, func(item models.ChannelMember, _ int) bool {
return !lo.Contains(successList, item.AccountID)
}), event)
go NotifyMessageEvent(members, event)
}
return event, nil