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, #missing_props, #optional_props, #property, #resolv_aliases

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:



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

property :author, :string

#created_atTime (readonly)

Returns Conversation creation time.

Returns:

  • (Time)

    Conversation creation time



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

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

#guidString (readonly)

A random string of at least 16 chars

Returns:

  • (String)

    conversation guid

See Also:



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

property :guid, :string

#messages[Entities::Message] (readonly)

Returns Messages of this conversation.

Returns:



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

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

#participantsString (readonly)

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

Returns:

  • (String)

    participants diaspora* IDs



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

property :participants, :string

#subjectString (readonly)

Returns the conversation subject.

Returns:

  • (String)

    the conversation subject



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

property :subject, :string