mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 04:26:22 +00:00
fixup! fix: no ignorar ningún evento
This commit is contained in:
parent
32042f32e2
commit
40edccf8bb
4 changed files with 12 additions and 4 deletions
|
@ -12,7 +12,6 @@ class ActivityPub < ApplicationRecord
|
||||||
IGNORED_STATES = %i[removed]
|
IGNORED_STATES = %i[removed]
|
||||||
|
|
||||||
include AASM
|
include AASM
|
||||||
include AasmEventsConcern
|
|
||||||
|
|
||||||
belongs_to :instance
|
belongs_to :instance
|
||||||
belongs_to :site
|
belongs_to :site
|
||||||
|
@ -91,6 +90,9 @@ class ActivityPub < ApplicationRecord
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Definir eventos en masa
|
||||||
|
include AasmEventsConcern
|
||||||
|
|
||||||
def reject_remotely!
|
def reject_remotely!
|
||||||
raise unless site.social_inbox.inbox.reject(id: object.uri).ok?
|
raise unless site.social_inbox.inbox.reject(id: object.uri).ok?
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,6 @@ class ActivityPub
|
||||||
IGNORED_STATES = []
|
IGNORED_STATES = []
|
||||||
|
|
||||||
include AASM
|
include AASM
|
||||||
include AasmEventsConcern
|
|
||||||
|
|
||||||
aasm do
|
aasm do
|
||||||
state :waiting, initial: true
|
state :waiting, initial: true
|
||||||
|
@ -26,6 +25,9 @@ class ActivityPub
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Definir eventos en masa
|
||||||
|
include AasmEventsConcern
|
||||||
|
|
||||||
belongs_to :actor
|
belongs_to :actor
|
||||||
belongs_to :site
|
belongs_to :site
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ class ActorModeration < ApplicationRecord
|
||||||
IGNORED_STATES = %i[removed]
|
IGNORED_STATES = %i[removed]
|
||||||
|
|
||||||
include AASM
|
include AASM
|
||||||
include AasmEventsConcern
|
|
||||||
|
|
||||||
belongs_to :site
|
belongs_to :site
|
||||||
belongs_to :remote_flag, optional: true, class_name: 'ActivityPub::RemoteFlag'
|
belongs_to :remote_flag, optional: true, class_name: 'ActivityPub::RemoteFlag'
|
||||||
|
@ -74,6 +73,9 @@ class ActorModeration < ApplicationRecord
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Definir eventos en masa
|
||||||
|
include AasmEventsConcern
|
||||||
|
|
||||||
def pause_remotely!
|
def pause_remotely!
|
||||||
raise unless
|
raise unless
|
||||||
actor.mention &&
|
actor.mention &&
|
||||||
|
|
|
@ -6,7 +6,6 @@ class InstanceModeration < ApplicationRecord
|
||||||
IGNORED_STATES = []
|
IGNORED_STATES = []
|
||||||
|
|
||||||
include AASM
|
include AASM
|
||||||
include AasmEventsConcern
|
|
||||||
|
|
||||||
belongs_to :site
|
belongs_to :site
|
||||||
belongs_to :instance, class_name: 'ActivityPub::Instance'
|
belongs_to :instance, class_name: 'ActivityPub::Instance'
|
||||||
|
@ -51,6 +50,9 @@ class InstanceModeration < ApplicationRecord
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Definir eventos en masa
|
||||||
|
include AasmEventsConcern
|
||||||
|
|
||||||
# @return [Array<String>]
|
# @return [Array<String>]
|
||||||
def actor_ids
|
def actor_ids
|
||||||
ActivityPub::Actor.where(instance_id: self.instance_id).ids
|
ActivityPub::Actor.where(instance_id: self.instance_id).ids
|
||||||
|
|
Loading…
Reference in a new issue