Don't preload just public events, group draft can be fetched as well
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
6066a44ae8
commit
ecfcc4fe83
@ -14,7 +14,7 @@ defmodule Mobilizon.Federation.ActivityPub.Preloader do
|
|||||||
|
|
||||||
@spec maybe_preload(struct()) :: {:ok, struct()} | {:error, struct()}
|
@spec maybe_preload(struct()) :: {:ok, struct()} | {:error, struct()}
|
||||||
def maybe_preload(%Event{url: url}),
|
def maybe_preload(%Event{url: url}),
|
||||||
do: {:ok, Events.get_public_event_by_url_with_preload!(url)}
|
do: {:ok, Events.get_event_by_url!(url)}
|
||||||
|
|
||||||
def maybe_preload(%Comment{url: url}),
|
def maybe_preload(%Comment{url: url}),
|
||||||
do: {:ok, Discussions.get_comment_from_url_with_preload!(url)}
|
do: {:ok, Discussions.get_comment_from_url_with_preload!(url)}
|
||||||
|
Loading…
Reference in New Issue
Block a user