mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-23 00:14:48 +00:00
Fix error when determining audience for Discussion
Closes #873 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b4bfa0856f
commit
18cd7c11f1
1 changed files with 5 additions and 3 deletions
|
@ -3,7 +3,7 @@ defmodule Mobilizon.Federation.ActivityPub.Audience do
|
|||
Tools for calculating content audience
|
||||
"""
|
||||
|
||||
alias Mobilizon.{Actors, Events, Share}
|
||||
alias Mobilizon.{Actors, Discussions, Events, Share}
|
||||
alias Mobilizon.Actors.{Actor, Member}
|
||||
alias Mobilizon.Discussions.{Comment, Discussion}
|
||||
alias Mobilizon.Events.{Event, Participant}
|
||||
|
@ -43,8 +43,10 @@ defmodule Mobilizon.Federation.ActivityPub.Audience do
|
|||
%{"to" => [@ap_public], "cc" => []}
|
||||
end
|
||||
|
||||
def get_audience(%Comment{discussion: %Discussion{} = discussion}) do
|
||||
get_audience(discussion)
|
||||
def get_audience(%Comment{discussion: %Discussion{id: discussion_id}}) do
|
||||
discussion_id
|
||||
|> Discussions.get_discussion()
|
||||
|> get_audience()
|
||||
end
|
||||
|
||||
def get_audience(%Comment{
|
||||
|
|
Loading…
Reference in a new issue