diaspora_federation/lib/diaspora_federation/entities/comment.rb
Benjamin Neff 08ecfca5d3 rename target_type to parent_type in relayables
this is equivalent to parent_guid and parent_author_signature

also added a validator for parent_type
2016-01-22 01:05:42 +01:00

32 lines
844 B
Ruby

module DiasporaFederation
module Entities
# this entity represents a comment to some kind of post (e.g. status message)
#
# @see Validators::CommentValidator
class Comment < Entity
# @!attribute [r] guid
# a random string of at least 16 chars.
# @see Validation::Rule::Guid
# @return [String] comment guid
property :guid
include Relayable
# @!attribute [r] text
# @return [String] the comment text
property :text
# @!attribute [r] diaspora_id
# The diaspora ID of the author.
# @see Person#diaspora_id
# @return [String] diaspora ID
property :diaspora_id, xml_name: :diaspora_handle
# The {Comment} parent is a Post
# @return [String] parent type
def parent_type
"Post"
end
end
end
end