🐛 Trying to fix panic

This commit is contained in:
LittleSheep 2024-10-18 23:10:33 +08:00
parent e83e92b054
commit e412d5e742
2 changed files with 5 additions and 5 deletions

View File

@ -4,9 +4,9 @@
<option name="autoReloadType" value="ALL" />
</component>
<component name="ChangeListManager">
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix notification order">
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix notification order... again">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/internal/server/api/notifications_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/notifications_api.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/internal/grpc/notifier.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/grpc/notifier.go" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -153,7 +153,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value=":bug: Fix bot related key api issue" />
<MESSAGE value=":bug: Fix query statement column issue" />
<MESSAGE value=":sparkles: Daily signs" />
<MESSAGE value=":bug: Fix daily check issue" />
@ -178,7 +177,8 @@
<MESSAGE value=":alien: Support better metadata encoder / decoder" />
<MESSAGE value=":bug: Bug fixes on compile time" />
<MESSAGE value=":bug: Fix notification order" />
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix notification order" />
<MESSAGE value=":bug: Fix notification order... again" />
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix notification order... again" />
</component>
<component name="VgoProject">
<settings-migrated>true</settings-migrated>

View File

@ -68,7 +68,7 @@ func (v *Server) NotifyUserBatch(_ context.Context, in *proto.NotifyUserBatchReq
var checklist = make(map[uint]bool, len(users))
var notifications []models.Notification
for _, user := range users {
if checklist[user.ID] {
if _, ok := checklist[user.ID]; ok {
continue
}