class ActivityPub::Object

Included Modules

Extended Modules

Direct Known Subclasses

Defined in:

controllers/streaming.cr
models/activity_pub/object.cr
models/activity_pub/object/article.cr
models/activity_pub/object/audio.cr
models/activity_pub/object/event.cr
models/activity_pub/object/image.cr
models/activity_pub/object/note.cr
models/activity_pub/object/page.cr
models/activity_pub/object/place.cr
models/activity_pub/object/question.cr
models/activity_pub/object/tombstone.cr
models/activity_pub/object/video.cr
models/relationship/content/follow/thread.cr
models/task/fetch/thread.cr
rules/content_rules.cr

Class Method Summary

Instance Method Summary

Class methods inherited from module ActivityPub

from_json_ld(json, **options) from_json_ld, from_json_ld?(json, **options) from_json_ld?

Instance methods inherited from module Ktistec::Model::Renderable

to_html to_html

Instance methods inherited from module Ktistec::Model::Blockable

block! block!, blocked? blocked?, blocked_at : Time | Nil blocked_at, blocked_at=(blocked_at : Time | Nil) blocked_at=, unblock! unblock!

Instance methods inherited from module Ktistec::Model::Deletable

delete! delete!, deleted? deleted?, deleted_at : Time | Nil deleted_at, deleted_at=(deleted_at : Time | Nil) deleted_at=

Instance methods inherited from module Ktistec::Model::Polymorphic

as_a(as _as : T.class) : T forall T as_a, type : String type, type=(type : String) type=

Macros inherited from module Ktistec::Model::Polymorphic

find(_id id, *, as _as)
find(*, as _as, **options)
find

Instance methods inherited from module Ktistec::Model::Linked

cached? cached?, local? local?, origin origin, to_s(io : IO) to_s, uid uid

Instance methods inherited from module Ktistec::Model::Common

created_at : Time created_at, created_at=(created_at : Time) created_at=, updated_at : Time updated_at, updated_at=(updated_at : Time) updated_at=

Instance methods inherited from module Ktistec::Model::InstanceMethods

==(other) ==, _run_validations _run_validations, _save_model(skip_validation = false) _save_model, _serialize_graph(nodes, association = nil, index = nil, skip_associated = false) _serialize_graph, assign(properties : Hash(String, Any), *, _strict : Bool = false) forall Any
assign(*, _strict : Bool = false, **properties)
assign
, changed!(*properties : Symbol) changed!, changed?
changed?(*properties : Symbol)
changed?
, clear!
clear!(*properties : Symbol)
clear!
, destroy destroy, destroyed? destroyed?, errors errors, hash(hasher) hash, inspect(io : IO) inspect, new_record? new_record?, reload! reload!, save(skip_validation = false, skip_associated = false) save, serialize_graph(skip_associated = false) serialize_graph, table_name table_name, to_h to_h, to_json(json : JSON::Builder) to_json, to_s(io : IO) to_s, update_property(property, value) update_property, valid?(skip_associated = false) valid?, validate(skip_associated = false) validate

Constructor methods inherited from module Ktistec::Model::InstanceMethods

new(properties : Hash(String, Any), *, _strict : Bool = false) forall Any
new(*, _strict : Bool = false, **properties)
new

Macros inherited from module Ktistec::Model::InstanceMethods

belongs_to(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil) belongs_to, derived(decl, *, aliased_to) derived, has_many(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil) has_many, has_one(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil) has_one, validates(property, &block) validates

Instance methods inherited from module Ktistec::Model

id : Int64 | Nil id, id=(id : Int64 | Nil) id=

Class Method Detail

def self.dereference?(key_pair, iri, *, ignore_cached = false, include_deleted = false, **options) : self | Nil #

[View source]
def self.federated_posts(page = 1, size = 10) #

Returns federated posts.

Includes local posts. Does not include private (not visible) posts.


[View source]
def self.federated_posts_count #

Returns the count of federated posts.

Includes local posts. Does not include private (not visible) posts.


[View source]
def self.find(_iri iri : String | Nil, include_deleted : Bool = false, include_undone : Bool = false) #

[View source]
def self.find?(_iri iri : String | Nil, include_deleted : Bool = false, include_undone : Bool = false) #

[View source]
def self.from_json_ld(json, **options) #

[View source]
def self.from_json_ld?(json, **options) #

[View source]
def self.map(json : JSON::Any | String | IO, **options) #

[View source]
def self.public_posts(page = 1, size = 10) #

Returns the site's public posts.

Does not include private (not visible) posts and replies.


[View source]
def self.public_posts_count #

Returns the count of the site's public posts.

Does not include private (not visible) posts and replies.


[View source]

Instance Method Detail

def _association_attributed_to #

[View source]
def _association_hashtags #

[View source]
def _association_in_reply_to #

[View source]
def _association_mentions #

[View source]
def _belongs_to_setter_for_attributed_to(attributed_to_ : ActivityPub::Actor, update_associations = true) : ActivityPub::Actor #

[View source]
def _belongs_to_setter_for_in_reply_to(in_reply_to_ : ActivityPub::Object, update_associations = true) : ActivityPub::Object #

[View source]
def _has_many_setter_for_hashtags(hashtags_ : Enumerable(Tag::Hashtag), update_associations = true) : Enumerable(Tag::Hashtag) #

[View source]
def _has_many_setter_for_mentions(mentions_ : Enumerable(Tag::Mention), update_associations = true) : Enumerable(Tag::Mention) #

[View source]
def activities(inclusion = nil, exclusion = nil) #

[View source]
def after_create #

[View source]
def after_delete #

[View source]
def after_destroy #

[View source]
def after_save #

[View source]
def ancestors(approved_by) #

[View source]
def ancestors #

[View source]
def announces_count : Int64 #

[View source]
def announces_count=(announces_count : Int64) #

[View source]
def approved_by?(approved_by) #

[View source]
def attachments : Array(Attachment) | Nil #

[View source]
def attachments=(attachments : Array(Attachment) | Nil) #

[View source]
def attributed_to(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor #

[View source]
def attributed_to=(attributed_to_ : ActivityPub::Actor) : ActivityPub::Actor #

[View source]
def attributed_to?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor | Nil #

[View source]
def attributed_to?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options) #

def attributed_to_iri : String | Nil #

[View source]
def attributed_to_iri=(attributed_to_iri : String | Nil) #

[View source]
def before_save #

[View source]
def before_validate #

[View source]
def canonical_path #

[View source]
def canonical_path=(canonical_path : Nil | String) #

[View source]
def cc : Array(String) | Nil #

[View source]
def cc=(cc : Array(String) | Nil) #

[View source]
def content : String | Nil #

[View source]
def content=(content : String | Nil) #

[View source]
def depth : Int32 #

[View source]
def depth=(depth : Int32) #

[View source]
def display_date(timezone = nil) #

[View source]
def display_link #

[View source]
def draft? #

[View source]
def external? #

[View source]
def from_json_ld(json) #

[View source]
def hashtags(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Tag::Hashtag) #

[View source]
def hashtags=(hashtags_ : Enumerable(Tag::Hashtag)) : Enumerable(Tag::Hashtag) #

[View source]
def in_reply_to(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object #

[View source]
def in_reply_to=(in_reply_to_ : ActivityPub::Object) : ActivityPub::Object #

[View source]
def in_reply_to?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object | Nil #

[View source]
def in_reply_to?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options) #

def in_reply_to_iri : String | Nil #

[View source]
def in_reply_to_iri=(in_reply_to_iri : String | Nil) #

[View source]
def iri : String #

def iri=(iri : String) #

def likes_count : Int64 #

[View source]
def likes_count=(likes_count : Int64) #

[View source]
def make_delete_activity #

[View source]
def media_type : String | Nil #

[View source]
def media_type=(media_type : String | Nil) #

[View source]
def mentions(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Tag::Mention) #

[View source]
def mentions=(mentions_ : Enumerable(Tag::Mention)) : Enumerable(Tag::Mention) #

[View source]
def name : String | Nil #

[View source]
def name=(name : String | Nil) #

[View source]
def published : Time | Nil #

[View source]
def published=(published : Time | Nil) #

[View source]
def replies : ActivityPub::Collection #

def replies(*, for_actor) #

Returns all replies to this object.

Intended for presenting an object's replies to an authorized user (one who may see all objects).

The for_actor parameter must be specified to disambiguate this method from the #replies property getter, but is not currently used.


[View source]
def replies(*, approved_by) #

Returns all replies to this object which have been approved by approved_by.

Intended for presenting an object's replies to an unauthorized user (one who may not see all objects e.g. an anonymous user).


[View source]
def replies=(replies : ActivityPub::Collection) #

[View source]
def replies? : ActivityPub::Collection | Nil #

def replies_count : Int64 #

[View source]
def replies_count=(replies_count : Int64) #

[View source]
def replies_iri : String | Nil #

[View source]
def replies_iri=(replies_iri : String | Nil) #

[View source]
def root? #

[View source]
def short_date(timezone = nil) #

[View source]
def source : Source | Nil #

[View source]
def source=(source : Source | Nil) #

[View source]
def summary : String | Nil #

[View source]
def summary=(summary : String | Nil) #

[View source]
def tags #

[View source]
def thread : String | Nil #

[View source]
def thread(*, for_actor) #

Returns all objects in the thread to which this object belongs.

Intended for presenting a thread to an authorized user (one who may see all objects in a thread).

The for_actor parameter must be specified to disambiguate this method from the #thread property getter, but is not currently used.


[View source]
def thread(*, approved_by) #

Returns all objects in the thread to which this object belongs which have been approved by approved_by.

Intended for presenting a thread to an unauthorized user (one who may not see all objects in a thread e.g. an anonymous user).


[View source]
def thread=(thread : String | Nil) #

[View source]
def to : Array(String) | Nil #

[View source]
def to=(to : Array(String) | Nil) #

[View source]
def to_json_ld(recursive = true) #

[View source]
def urls : Array(String) | Nil #

[View source]
def urls=(urls : Array(String) | Nil) #

[View source]
def validate_model #

[View source]
def visible : Bool #

[View source]
def visible=(visible : Bool) #

[View source]
def with_replies_count!(approved_by) #

[View source]
def with_replies_count! #

[View source]
def with_statistics! #

[View source]