Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Jan 13, 2025
1 parent 7e766ef commit b7d9aac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion lib/acts/anti_spam_act.ex
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ defmodule Bonfire.Social.Acts.AntiSpam do
maybe_apply(Bonfire.Me.Users, :get_or_create_automod, [],
fallback_return: nil
) || current_user,
object
object,
skip_federation: true
) do
error("could not flag for mods to check")
raise Bonfire.Fail, :spam
Expand Down
13 changes: 7 additions & 6 deletions lib/flags.ex
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,13 @@ defmodule Bonfire.Social.Flags do
case check_flag(flagger, object, opts)
~> create(flagger, ..., opts) do
{:ok, flag} ->
if id(flagger) not in maybe_apply(
Bonfire.Federate.ActivityPub,
:do_not_federate_user_ids,
[],
fallback_return: []
) do
if opts[:skip_federation] != true and
id(flagger) not in maybe_apply(
Bonfire.Federate.ActivityPub,
:do_not_federate_user_ids,
[],
fallback_return: []
) do
Social.maybe_federate_and_gift_wrap_activity(flagger, flag)
else
{:ok, flag}
Expand Down

0 comments on commit b7d9aac

Please sign in to comment.