fix(event announcements): only show comments from event organizers in event announcement list
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
387d3b1c30
commit
01eecbf1d4
|
@ -104,6 +104,10 @@ defmodule Mobilizon.Conversations do
|
|||
|> join(:inner, [_cp, _c, _e, _a, _lc, _oc, p], ap in Actor, on: p.actor_id == ap.id)
|
||||
|> where([_cp, c], c.event_id == ^event_id)
|
||||
|> where([cp], cp.actor_id == ^actor_id)
|
||||
|> where(
|
||||
[_cp, _c, _e, _a, _lc, oc],
|
||||
oc.actor_id == ^actor_id or oc.attributed_to_id == ^actor_id
|
||||
)
|
||||
|> order_by([cp], desc: cp.unread, desc: cp.updated_at)
|
||||
|> preload([_cp, c, e, a, lc, oc, p, ap],
|
||||
actor: a,
|
||||
|
|
Loading…
Reference in a new issue