Alternative implementation of hashtag-filtering queries in ActivityPub. Fixed GROUP BY clause for aggregation on hashtags.
This commit is contained in:
parent
367f0c31c3
commit
303055456f
2 changed files with 100 additions and 22 deletions
|
|
@ -113,6 +113,7 @@ defmodule Pleroma.Activity do
|
|||
from([a] in query,
|
||||
left_join: b in Bookmark,
|
||||
on: b.user_id == ^user.id and b.activity_id == a.id,
|
||||
as: :bookmark,
|
||||
preload: [bookmark: b]
|
||||
)
|
||||
end
|
||||
|
|
@ -123,6 +124,7 @@ defmodule Pleroma.Activity do
|
|||
from([a] in query,
|
||||
left_join: r in ReportNote,
|
||||
on: a.id == r.activity_id,
|
||||
as: :report_note,
|
||||
preload: [report_notes: r]
|
||||
)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue