Class: DiasporaFederation::Entities::Conversation

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

Overview

This entity represents a private conversation between users.

Constant Summary

Constants inherited from DiasporaFederation::Entity

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

Instance Attribute Summary collapse

Method Summary

Methods inherited from DiasporaFederation::Entity

class_name, entity_class, entity_name, from_hash, from_json, from_xml, #initialize, #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

This class inherits a constructor from DiasporaFederation::Entity

Instance Attribute Details

#authorString (readonly)

The diaspora* ID of the person initiated the conversation

Returns:

  • (String)

    diaspora* ID

See Also:



11
# File 'lib/diaspora_federation/entities/conversation.rb', line 11

property :author, :string, xml_name: :diaspora_handle

#created_atTime (readonly)

Returns Conversation creation time

Returns:

  • (Time)

    Conversation creation time



25
# File 'lib/diaspora_federation/entities/conversation.rb', line 25

property :created_at, :timestamp, default: -> { Time.now.utc }

#guidString (readonly)

A random string of at least 16 chars

Returns:

  • (String)

    conversation guid

See Also:



17
# File 'lib/diaspora_federation/entities/conversation.rb', line 17

property :guid, :string

#messages[Entities::Message] (readonly)

Returns Messages of this conversation

Returns:



34
# File 'lib/diaspora_federation/entities/conversation.rb', line 34

entity :messages, [Entities::Message], default: []

#participantsString (readonly)

The diaspora* IDs of the persons participating the conversation separated by “;”

Returns:

  • (String)

    participants diaspora* IDs



30
# File 'lib/diaspora_federation/entities/conversation.rb', line 30

property :participants, :string, xml_name: :participant_handles

#subjectString (readonly)

Returns the conversation subject

Returns:

  • (String)

    the conversation subject



21
# File 'lib/diaspora_federation/entities/conversation.rb', line 21

property :subject, :string