Relayables are now ordered by the order of the properties of the entity. Related to #26, but still compatible with pods older than 0.6.3.0.
23 lines
797 B
Ruby
23 lines
797 B
Ruby
module DiasporaFederation
|
|
module Entities
|
|
# This entity represents a like to some kind of post (e.g. status message).
|
|
#
|
|
# @see Validators::LikeValidator
|
|
class Like < Entity
|
|
include Relayable
|
|
|
|
# @!attribute [r] parent_type
|
|
# A string describing the type of the parent
|
|
# Can be "Post" or "Comment" (Comments are currently not implemented in the
|
|
# diaspora* frontend).
|
|
# @return [String] parent type
|
|
property :parent_type, :string, xml_name: :target_type
|
|
|
|
# @!attribute [r] positive
|
|
# If +true+ set a like, if +false+, set a dislike (dislikes are currently not
|
|
# implemented in the diaspora* frontend).
|
|
# @return [Boolean] is it a like or a dislike
|
|
property :positive, :boolean
|
|
end
|
|
end
|
|
end
|