Class: DiasporaFederation::Entities::RelayableRetraction Deprecated
- Inherits:
-
DiasporaFederation::Entity
- Object
- DiasporaFederation::Entity
- DiasporaFederation::Entities::RelayableRetraction
- Defined in:
- lib/diaspora_federation/entities/relayable_retraction.rb
Overview
will be replaced with Retraction
This entity represents a claim of deletion of a previously federated relayable entity. (Comment, Like)
There are two cases of federation of the RelayableRetraction. Retraction from the dowstream object owner is when an author of the relayable (e.g. Comment) deletes it themself. In this case only target_author_signature is filled and a retraction is sent to the commented post’s author. Here the upstream object owner signs it with the parent’s author key, puts the signature in parent_author_signature and sends it to other pods where other participating people are present. This is the second case - retraction from the upstream object owner. Retraction from the upstream object owner can also be performed by the upstream object owner themself - they have a right to delete comments on their posts. In any case in the retraction by the upstream author target_author_signature is not checked, only parent_author_signature is checked.
Constant Summary
Constants inherited from DiasporaFederation::Entity
DiasporaFederation::Entity::ENTITY_NAME_REGEX, DiasporaFederation::Entity::INVALID_XML_REGEX
Instance Attribute Summary collapse
-
#author ⇒ String
readonly
The diaspora* ID of the person who deletes a relayable.
-
#parent_author_signature ⇒ String
readonly
Contains a signature of the entity using the private key of the author of a parent post.
-
#target_author_signature ⇒ String
readonly
Contains a signature of the entity using the private key of the author of a federated relayable entity.
-
#target_guid ⇒ String
readonly
Guid of a relayable to be deleted.
-
#target_type ⇒ String
readonly
A string describing a type of the target.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Retraction
Instance.
Instance Method Summary collapse
-
#initialize ⇒ RelayableRetraction
constructor
A new instance of RelayableRetraction.
Methods inherited from DiasporaFederation::Entity
class_name, entity_class, entity_name, from_json, from_xml, #to_h, #to_json, #to_s, #to_xml
Methods included from PropertiesDSL
#class_props, #default_values, #entity, #find_property_for_xml_name, #missing_props, #optional_props, #property, #resolv_aliases, #xml_names
Methods included from Logging
Constructor Details
#initialize ⇒ RelayableRetraction
Returns a new instance of RelayableRetraction.
56 57 58 |
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 56 def initialize(*) raise "Sending RelayableRetraction is not supported anymore! Use Retraction instead!" end |
Instance Attribute Details
#author ⇒ String (readonly)
The diaspora* ID of the person who deletes a relayable
45 |
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 45 property :author, :string, xml_name: :sender_handle |
#parent_author_signature ⇒ String (readonly)
Contains a signature of the entity using the private key of the author of a parent post. This signature is mandatory only when federating from an upstream author to the subscribers.
27 |
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 27 property :parent_author_signature, :string, default: nil |
#target_author_signature ⇒ String (readonly)
54 |
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 54 property :target_author_signature, :string, default: nil |
#target_guid ⇒ String (readonly)
Guid of a relayable to be deleted
33 |
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 33 property :target_guid, :string |
#target_type ⇒ String (readonly)
A string describing a type of the target
39 |
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 39 property :target_type, :string |
Class Method Details
.from_hash(hash) ⇒ Retraction
Returns instance.
61 62 63 |
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 61 def self.from_hash(hash) Retraction.from_hash(hash) end |