5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 00:56:22 +00:00
panel/app/models/activity_pub/object.rb

18 lines
425 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# Almacena objetos de ActivityPub, como Note, Article, etc.
2024-02-21 15:46:38 +00:00
class ActivityPub
class Object < ApplicationRecord
include ActivityPub::Concerns::JsonLdConcern
2024-02-21 15:46:38 +00:00
has_many :activity_pubs, as: :object
# Encontrar le Actor por su relación con el objeto
#
# @return [ActivityPub::Actor,nil]
def actor
ActivityPub::Actor.find_by(uri: content['actor'])
end
2024-02-21 15:46:38 +00:00
end
end