5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 23:56:22 +00:00

fixup! fix: no ignorar ningún evento

This commit is contained in:
f 2024-03-13 11:15:31 -03:00
parent 32042f32e2
commit 40edccf8bb
No known key found for this signature in database
4 changed files with 12 additions and 4 deletions

View file

@ -12,7 +12,6 @@ class ActivityPub < ApplicationRecord
IGNORED_STATES = %i[removed]
include AASM
include AasmEventsConcern
belongs_to :instance
belongs_to :site
@ -91,6 +90,9 @@ class ActivityPub < ApplicationRecord
end
end
# Definir eventos en masa
include AasmEventsConcern
def reject_remotely!
raise unless site.social_inbox.inbox.reject(id: object.uri).ok?
end

View file

@ -6,7 +6,6 @@ class ActivityPub
IGNORED_STATES = []
include AASM
include AasmEventsConcern
aasm do
state :waiting, initial: true
@ -26,6 +25,9 @@ class ActivityPub
end
end
# Definir eventos en masa
include AasmEventsConcern
belongs_to :actor
belongs_to :site

View file

@ -6,7 +6,6 @@ class ActorModeration < ApplicationRecord
IGNORED_STATES = %i[removed]
include AASM
include AasmEventsConcern
belongs_to :site
belongs_to :remote_flag, optional: true, class_name: 'ActivityPub::RemoteFlag'
@ -74,6 +73,9 @@ class ActorModeration < ApplicationRecord
end
end
# Definir eventos en masa
include AasmEventsConcern
def pause_remotely!
raise unless
actor.mention &&

View file

@ -6,7 +6,6 @@ class InstanceModeration < ApplicationRecord
IGNORED_STATES = []
include AASM
include AasmEventsConcern
belongs_to :site
belongs_to :instance, class_name: 'ActivityPub::Instance'
@ -51,6 +50,9 @@ class InstanceModeration < ApplicationRecord
end
end
# Definir eventos en masa
include AasmEventsConcern
# @return [Array<String>]
def actor_ids
ActivityPub::Actor.where(instance_id: self.instance_id).ids