5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-05-19 09:20:49 +00:00

fix: reportar implicar bloquear #15600

This commit is contained in:
f 2024-03-20 17:50:39 -03:00
parent 0a1b86c111
commit 0578b03ee7
No known key found for this signature in database
4 changed files with 8 additions and 7 deletions

View file

@ -135,11 +135,12 @@ class ActivityPub < ApplicationRecord
end
end
# Solo podemos reportarla luego de rechazarla
# Reportarla implica rechazarla
event :report do
transitions from: :rejected, to: :reported
transitions from: %i[paused approved rejected], to: :reported
after do
ActivityPub::InboxJob.perform_later(site: site, activity: activities.first.uri, action: :reject)
ActivityPub::RemoteFlagJob.perform_later(remote_flag: remote_flag) if remote_flag.waiting?
end
end

View file

@ -43,7 +43,7 @@ class ActorModeration < ApplicationRecord
# Al reportar, necesitamos asociar una RemoteFlag para poder
# enviarla.
event :report do
transitions from: %i[blocked], to: :reported
transitions from: %i[pause allowed blocked], to: :reported, after: :synchronize!
after do
ActivityPub::RemoteFlagJob.perform_later(remote_flag: remote_flag) if remote_flag.waiting?

View file

@ -106,7 +106,7 @@ en:
text_reject: Reject
text_reply: Reply
text_report: Report
confirm_report: "Send report to the remote instance?"
confirm_report: "Send report to the remote instance? This action will also reject the comment."
instances_btn_box:
text_pause: Check case by case
text_allow: Allow everything
@ -116,7 +116,7 @@ en:
text_allow: Always approve
text_block: Block
text_report: Report
confirm_report: "Send report to the remote instance?"
confirm_report: "Send report to the remote instance? This action will also block the account."
remote_flags:
report_message: "Hi! Someone using Sutty CMS reported this account on your instance. We don't have support for customized report messages yet, but we will soon. You can reach us at %{panel_actor_mention}."
activity_pubs:

View file

@ -105,7 +105,7 @@ es:
text_approve: Aceptar
text_reject: Rechazar
text_report: Reportar
confirm_report: "¿Enviar el reporte a la instancia remota?"
confirm_report: "¿Enviar el reporte a la instancia remota? Esta acción también rechazará el comentario."
instances_btn_box:
text_pause: Moderar caso por caso
text_allow: Permitir todo
@ -115,7 +115,7 @@ es:
text_allow: Aprobar siempre
text_block: Bloquear
text_report: Reportar
confirm_report: "¿Enviar el reporte a la instancia remota?"
confirm_report: "¿Enviar el reporte a la instancia remota? Esta acción también bloqueará la cuenta."
remote_flags:
report_message: "¡Hola! Une usuarie de Sutty CMS reportó esta cuenta en tu instancia. Todavía no tenemos soporte para mensajes personalizados. Podés contactarnos en %{panel_actor_mention}."
activity_pubs: