The query for marking notifications as read has been simplified

This commit is contained in:
Mark Felder 2024-05-16 16:26:21 -04:00
parent e944b15298
commit 9ff30f5cb6
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1 @@
The query for marking notifications as read has been simplified

View file

@ -286,7 +286,8 @@ defmodule Pleroma.Notification do
|> Marker.multi_set_last_read_id(user, "notifications")
|> Repo.transaction()
for_user_query(user)
Notification
|> where(user_id: ^user_id)
|> where([n], n.id in ^notification_ids)
|> Repo.all()
end