Class: DiasporaFederation::Entities::RelayableRetraction Deprecated

Inherits:
DiasporaFederation::Entity show all
Defined in:
lib/diaspora_federation/entities/relayable_retraction.rb

Overview

Deprecated.

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.

See Also:

  • Validators::RelayableRetractionValidator

Constant Summary

Constants inherited from DiasporaFederation::Entity

DiasporaFederation::Entity::ENTITY_NAME_REGEX, DiasporaFederation::Entity::INVALID_XML_REGEX

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

included

Constructor Details

#initializeRelayableRetraction

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

#authorString (readonly)

The diaspora* ID of the person who deletes a relayable

Returns:

  • (String)

    diaspora* ID

See Also:



45
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 45

property :author, :string, xml_name: :sender_handle

#parent_author_signatureString (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.

Returns:

  • (String)

    parent author signature

See Also:



27
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 27

property :parent_author_signature, :string, default: nil

#target_author_signatureString (readonly)

Contains a signature of the entity using the private key of the author of a federated relayable entity. (Comment, Like) This signature is mandatory only when federation from the subscriber to an upstream author is done.

Returns:

  • (String)

    target author signature

See Also:



54
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 54

property :target_author_signature, :string, default: nil

#target_guidString (readonly)

Guid of a relayable to be deleted

Returns:

  • (String)

    target guid

See Also:



33
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 33

property :target_guid, :string

#target_typeString (readonly)

A string describing a type of the target

Returns:

  • (String)

    target type

See Also:



39
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 39

property :target_type, :string

Class Method Details

.from_hash(hash) ⇒ Retraction

Returns instance

Returns:



61
62
63
# File 'lib/diaspora_federation/entities/relayable_retraction.rb', line 61

def self.from_hash(hash)
  Retraction.from_hash(hash)
end