# frozen_string_literal: true # = Instance = # # Representa cada instancia del fediverso que interactĂșa con la Social # Inbox. class ActivityPub class Instance < ApplicationRecord include AASM validates :aasm_state, presence: true, inclusion: { in: %w[paused allowed blocked] } validates :hostname, uniqueness: true, hostname: true has_many :activity_pubs has_many :actors has_many :instance_moderations aasm do state :paused, initial: true state :allowed state :blocked end def uri @uri ||= "https://#{hostname}/" end end end