aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/marker.ex5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pleroma/marker.ex b/lib/pleroma/marker.ex
index 4b8198690..098fe3bbd 100644
--- a/lib/pleroma/marker.ex
+++ b/lib/pleroma/marker.ex
@@ -56,8 +56,9 @@ defmodule Pleroma.Marker do
where: q.user_id == ^user.id,
select: %{
timeline: "notifications",
- user_id: ^user.id,
- unread_count: fragment("SUM( CASE WHEN seen = false THEN 1 ELSE 0 END ) as unread_count")
+ user_id: type(^user.id, :string),
+ unread_count: fragment("SUM( CASE WHEN seen = false THEN 1 ELSE 0 END )"),
+ last_read_id: type(fragment("MAX( CASE WHEN seen = true THEN id ELSE null END )"), :string)
}
)