Skip to content

Commit 8caceb1

Browse files
committed
tests
1 parent ea24b30 commit 8caceb1

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

lib/activities.ex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ defmodule Bonfire.Social.Activities do
2727
# alias Bonfire.Data.Social.Flag
2828
# alias Bonfire.Data.Social.Replied
2929
alias Bonfire.Data.Social.Seen
30-
30+
alias Bonfire.Data.Edges.Request
3131
alias Bonfire.Data.Edges.Edge
3232
alias Bonfire.Data.AccessControl.Verb
3333
alias Bonfire.Data.Identity.User
@@ -649,12 +649,12 @@ defmodule Bonfire.Social.Activities do
649649
query
650650
|> proload(activity: [object: [:extra_info]])
651651

652-
# :with_quote_post_requested ->
653-
# quote_table_id = Bonfire.Social.Quotes.quote_verb_id()
654-
655-
# posts_query = from e in Edge, where: e.table_id == ^quote_table_id
652+
:with_quote_post_requested ->
653+
# NOTE: better only as postload
654+
# quote_table_id = Bonfire.Social.Quotes.quote_verb_id()
655+
# posts_query = from e in Edge, where: e.table_id == ^quote_table_id
656+
query
656657

657-
# query
658658
# |> proload(activity: [edge: ^{posts_query, [subject: [:profile, :character]]}])
659659

660660
nil ->
@@ -782,7 +782,7 @@ defmodule Bonfire.Social.Activities do
782782

783783
quote_edge_query = from e in Edge, where: e.table_id == ^quote_table_id
784784

785-
[edge: {quote_edge_query, [subject: [:post_content]]}]
785+
[edge: {quote_edge_query, [:request, subject: [:post_content]]}]
786786

787787
nil ->
788788
[]

lib/feed_loader.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ defmodule Bonfire.Social.FeedLoader do
8585
prepare_feed_preset_and_filters(nil, custom_filters |> Map.put(:feed_name, nil), opts)
8686

8787
{:error, e} ->
88-
error(e)
88+
{:error, e}
89+
90+
e ->
91+
error(e, "Could not find a preset feed")
8992
end
9093
end
9194

lib/quotes.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ defmodule Bonfire.Social.Quotes do
336336
),
337337
%ActivityPub.Object{} = quote_request_activity <-
338338
ActivityPub.Object.fetch_latest_activity(quote_actor, ap_quoted_object, "QuoteRequest")
339-
|> debug("latest"),
339+
|> debug("latest") || {:error, :not_found},
340340
{:ok, result} <-
341341
ActivityPub.reject(%{
342342
actor: quoted_actor,

0 commit comments

Comments
 (0)