class
   ActivityPub::Object
 
  - ActivityPub::Object
 - Reference
 - Object
 
Included Modules
- ActivityPub
 - Ktistec::Model
 - Ktistec::Model::Blockable
 - Ktistec::Model::Common
 - Ktistec::Model::Deletable
 - Ktistec::Model::Linked
 - Ktistec::Model::Polymorphic
 - School::DomainType
 
Extended Modules
Direct Known Subclasses
Defined in:
controllers/streaming.crmodels/activity_pub/object.cr
models/activity_pub/object/article.cr
models/activity_pub/object/note.cr
models/activity_pub/object/tombstone.cr
models/relationship/content/follow/thread.cr
models/task/fetch/thread.cr
rules/content_rules.cr
Constant Summary
- 
        ALIASES = 
["ActivityPub::Object::Audio", "ActivityPub::Object::Event", "ActivityPub::Object::Image", "ActivityPub::Object::Page", "ActivityPub::Object::Place", "ActivityPub::Object::Question", "ActivityPub::Object::Video"] 
Class Method Summary
- 
        .all_subtypes
        
          
Returns type and all concrete (non-abstract) subtypes, including any aliases defined on the type.
 - .dereference?(key_pair, iri, *, ignore_cached = false, include_deleted = false, **options) : self | Nil
 - 
        .federated_posts(page = 1, size = 10)
        
          
Returns federated posts.
 - 
        .federated_posts_count
        
          
Returns the count of federated posts.
 - .find(_iri iri : String | Nil, include_deleted : Bool = false, include_undone : Bool = false)
 - .find?(_iri iri : String | Nil, include_deleted : Bool = false, include_undone : Bool = false)
 - .from_json_ld(json, **options)
 - .from_json_ld?(json, **options)
 - 
        .latest_public_post
        
          
Returns an identifier associated with the latest public post.
 - .map(json, **options)
 - 
        .public_posts(page = 1, size = 10)
        
          
Returns the site's public posts.
 - 
        .public_posts_count
        
          
Returns the count of the site's public posts.
 
Instance Method Summary
- #_association_attributed_to
 - #_association_hashtags
 - #_association_in_reply_to
 - #_association_mentions
 - #_association_translations
 - #_belongs_to_setter_for_attributed_to(attributed_to_ : ActivityPub::Actor, update_associations = true) : ActivityPub::Actor
 - #_belongs_to_setter_for_in_reply_to(in_reply_to_ : ActivityPub::Object, update_associations = true) : ActivityPub::Object
 - #_has_many_setter_for_hashtags(hashtags_ : Enumerable(Tag::Hashtag), update_associations = true) : Enumerable(Tag::Hashtag)
 - #_has_many_setter_for_mentions(mentions_ : Enumerable(Tag::Mention), update_associations = true) : Enumerable(Tag::Mention)
 - #_has_many_setter_for_translations(translations_ : Enumerable(Translation), update_associations = true) : Enumerable(Translation)
 - #activities(inclusion = nil, exclusion = nil)
 - #after_create
 - #after_delete
 - #after_destroy
 - #after_save
 - #ancestors(approved_by)
 - #ancestors
 - #announces_count : Int64
 - #announces_count=(announces_count : Int64)
 - #approved_by?(approved_by)
 - #attachments : Array(Attachment) | Nil
 - #attachments=(attachments : Array(Attachment) | Nil)
 - #attributed_to(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor
 - #attributed_to=(attributed_to_ : ActivityPub::Actor) : ActivityPub::Actor
 - #attributed_to?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Actor | Nil
 - #attributed_to?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options)
 - #attributed_to_iri : String | Nil
 - #attributed_to_iri=(attributed_to_iri : String | Nil)
 - #audience : Array(String) | Nil
 - #audience=(audience : Array(String) | Nil)
 - #before_save
 - #before_validate
 - #canonical_path
 - #canonical_path=(canonical_path : Nil | String)
 - #cc : Array(String) | Nil
 - #cc=(cc : Array(String) | Nil)
 - #content : String | Nil
 - #content=(content : String | Nil)
 - #depth : Int32
 - #depth=(depth : Int32)
 - #dislikes_count : Int64
 - #dislikes_count=(dislikes_count : Int64)
 - #display_date(timezone = nil)
 - #display_link
 - #draft?
 - #external?
 - #from_json_ld(json)
 - #hashtags(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Tag::Hashtag)
 - #hashtags=(hashtags_ : Enumerable(Tag::Hashtag)) : Enumerable(Tag::Hashtag)
 - #in_reply_to(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object
 - #in_reply_to=(in_reply_to_ : ActivityPub::Object) : ActivityPub::Object
 - #in_reply_to?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object | Nil
 - #in_reply_to?(key_pair, *, dereference = false, ignore_cached = false, ignore_changed = false, **options)
 - #in_reply_to_iri : String | Nil
 - #in_reply_to_iri=(in_reply_to_iri : String | Nil)
 - #iri : String
 - #iri=(iri : String)
 - #language : String | Nil
 - #language=(language : String | Nil)
 - #likes_count : Int64
 - #likes_count=(likes_count : Int64)
 - #make_delete_activity
 - #media_type : String | Nil
 - #media_type=(media_type : String | Nil)
 - #mentions(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Tag::Mention)
 - #mentions=(mentions_ : Enumerable(Tag::Mention)) : Enumerable(Tag::Mention)
 - #name : String | Nil
 - #name=(name : String | Nil)
 - #published : Time | Nil
 - #published=(published : Time | Nil)
 - #replies : ActivityPub::Collection
 - 
        #replies(*, for_actor)
        
          
Returns all replies to this object.
 - 
        #replies(*, approved_by)
        
          
Returns all replies to this object which have been approved by
approved_by. - #replies=(replies : ActivityPub::Collection)
 - #replies? : ActivityPub::Collection | Nil
 - #replies_count : Int64
 - #replies_count=(replies_count : Int64)
 - #replies_iri : String | Nil
 - #replies_iri=(replies_iri : String | Nil)
 - #reply?
 - #root?
 - #sensitive : Bool
 - #sensitive=(sensitive : Bool)
 - #short_date(timezone = nil)
 - #source : Source | Nil
 - #source=(source : Source | Nil)
 - #summary : String | Nil
 - #summary=(summary : String | Nil)
 - #tags
 - #thread : String | Nil
 - 
        #thread(*, for_actor)
        
          
Returns all objects in the thread to which this object belongs.
 - 
        #thread(*, approved_by)
        
          
Returns all objects in the thread to which this object belongs which have been approved by
approved_by. - 
        #thread!
        
          
Updates the thread and saves the object.
 - #thread=(thread : String | Nil)
 - #to : Array(String) | Nil
 - #to=(to : Array(String) | Nil)
 - #to_json_ld(recursive = true)
 - #translations(include_deleted : Bool = false, include_undone : Bool = false) : Enumerable(Translation)
 - #translations=(translations_ : Enumerable(Translation)) : Enumerable(Translation)
 - #updated : Time | Nil
 - #updated=(updated : Time | Nil)
 - #urls : Array(String) | Nil
 - #urls=(urls : Array(String) | Nil)
 - #validate_model
 - #visible : Bool
 - #visible=(visible : Bool)
 - #with_replies_count!(approved_by)
 - #with_replies_count!
 - #with_statistics!
 
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::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
  
  
    
      _validate_type
    _validate_type, 
    
  
    
      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
  
  
    
      ==(other : self)==(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_changed!
clear_changed!(*properties : Symbol) clear_changed!, destroy destroy, destroyed? destroyed?, errors errors, hash(hasher) hash, id : Int64 | Nil id, id=(id : Int64 | Nil) id=, 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
  
  
    
      new(properties : Hash(String, Any), *, _strict : Bool = false) forall Anynew(*, _strict : Bool = false, **properties) new
Macros inherited from module Ktistec::Model
  
  
    
      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
    
  
    
      
      
      
      
    
      
      
      
      
    
  Class Method Detail
Returns type and all concrete (non-abstract) subtypes, including any aliases defined on the type.
Returns federated posts.
Includes local posts. Does not include private (not visible) posts.
Returns the count of federated posts.
Includes local posts. Does not include private (not visible) posts.
Returns an identifier associated with the latest public post.
Skips many joins and filters in the interest of speed.
It is intended for use in expiring cached results from the two methods above. If the identifier changes, the cached results are probably stale.
NB: The "identifier" is not necessarily the id of the latest
post!
Returns the site's public posts.
Does not include private (not visible) posts and replies.
Returns the count of the site's public posts.
Does not include private (not visible) posts and replies.
Instance Method Detail
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.
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).
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).
Does not filter out deleted or blocked objects. Leaves decisions about presentation of these objects and their replies to the caller.
The for_actor parameter must be specified to disambiguate this
method from the #thread property getter, but is not currently
used.
Returns all objects in the thread to which this object belongs
which have been approved by approved_by.
Does not filter out deleted or blocked objects. Leaves decisions about presentation of these objects and their replies to the caller.
Intended for presenting a thread to an unauthorized user (one who may not see all objects in a thread e.g. an anonymous user).
Updates the thread and saves the object.
On older databases, threads are lazily migrated. This is a convenience method for triggering the update and save, and returning the value.