mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-22 16:51:50 +00:00
Merge branch 'issue-15109-1' of https://0xacab.org/sutty/sutty into production.panel.sutty.nl
This commit is contained in:
commit
f678ba0f32
2 changed files with 12 additions and 2 deletions
|
@ -8,7 +8,12 @@ class ActivityPubsController < ApplicationController
|
||||||
define_method(event) do
|
define_method(event) do
|
||||||
authorize activity_pub
|
authorize activity_pub
|
||||||
|
|
||||||
activity_pub.update(remote_flag_params(activity_pub)) if event == :report
|
if event == :report
|
||||||
|
remote_flag_params(activity_pub).tap do |p|
|
||||||
|
activity_pub.remote_flag_id = p[:remote_flag_attributes][:id]
|
||||||
|
activity_pub.update(p)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
message =
|
message =
|
||||||
if activity_pub.public_send(:"may_#{event}?") && activity_pub.public_send(:"#{event}!")
|
if activity_pub.public_send(:"may_#{event}?") && activity_pub.public_send(:"#{event}!")
|
||||||
|
|
|
@ -15,7 +15,12 @@ class ActorModerationsController < ApplicationController
|
||||||
authorize actor_moderation
|
authorize actor_moderation
|
||||||
|
|
||||||
# Crea una RemoteFlag si se envían los parámetros adecuados
|
# Crea una RemoteFlag si se envían los parámetros adecuados
|
||||||
actor_moderation.update(remote_flag_params(actor_moderation)) if actor_event == :report
|
if actor_event == :report
|
||||||
|
remote_flag_params(actor_moderation).tap do |p|
|
||||||
|
actor_moderation.remote_flag_id = p[:remote_flag_attributes][:id]
|
||||||
|
actor_moderation.update(p)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
message =
|
message =
|
||||||
if actor_moderation.public_send(:"may_#{actor_event}?") && actor_moderation.public_send(:"#{actor_event}!")
|
if actor_moderation.public_send(:"may_#{actor_event}?") && actor_moderation.public_send(:"#{actor_event}!")
|
||||||
|
|
Loading…
Reference in a new issue