mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-23 08:22:50 +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
|
Tools for calculating content audience
|
||||||
"""
|
"""
|
||||||
|
|
||||||
alias Mobilizon.{Actors, Events, Share}
|
alias Mobilizon.{Actors, Discussions, Events, Share}
|
||||||
alias Mobilizon.Actors.{Actor, Member}
|
alias Mobilizon.Actors.{Actor, Member}
|
||||||
alias Mobilizon.Discussions.{Comment, Discussion}
|
alias Mobilizon.Discussions.{Comment, Discussion}
|
||||||
alias Mobilizon.Events.{Event, Participant}
|
alias Mobilizon.Events.{Event, Participant}
|
||||||
|
@ -43,8 +43,10 @@ defmodule Mobilizon.Federation.ActivityPub.Audience do
|
||||||
%{"to" => [@ap_public], "cc" => []}
|
%{"to" => [@ap_public], "cc" => []}
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_audience(%Comment{discussion: %Discussion{} = discussion}) do
|
def get_audience(%Comment{discussion: %Discussion{id: discussion_id}}) do
|
||||||
get_audience(discussion)
|
discussion_id
|
||||||
|
|> Discussions.get_discussion()
|
||||||
|
|> get_audience()
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_audience(%Comment{
|
def get_audience(%Comment{
|
||||||
|
|
Loading…
Reference in a new issue