mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:21:41 +00:00
fix: asignar la remote flag #15648
This commit is contained in:
parent
9dc0ed7684
commit
bcfb7a5a7f
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