Move public flag from status_message to post
This represents the current state of the documentation.
This commit is contained in:
parent
b1b511b6f7
commit
35efeb8345
3 changed files with 8 additions and 8 deletions
|
|
@ -19,6 +19,10 @@ module DiasporaFederation
|
|||
# Post entity creation time
|
||||
# @return [Time] creation time
|
||||
#
|
||||
# @!attribute [r] public
|
||||
# Shows whether the post is visible to everyone or only to some aspects
|
||||
# @return [Boolean] is it public
|
||||
#
|
||||
# @!attribute [r] provider_display_name
|
||||
# A string that describes a means by which a user has posted the post
|
||||
# @return [String] provider display name
|
||||
|
|
@ -29,6 +33,7 @@ module DiasporaFederation
|
|||
property :author, :string, xml_name: :diaspora_handle
|
||||
property :guid, :string
|
||||
property :created_at, :timestamp, default: -> { Time.now.utc }
|
||||
property :public, :boolean, default: false
|
||||
property :provider_display_name, :string, optional: true
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -31,11 +31,6 @@ module DiasporaFederation
|
|||
# @return [Entities::Event] event
|
||||
entity :event, Entities::Event, optional: true
|
||||
|
||||
# @!attribute [r] public
|
||||
# Shows whether the status message is visible to everyone or only to some aspects
|
||||
# @return [Boolean] is it public
|
||||
property :public, :boolean, default: false
|
||||
|
||||
private
|
||||
|
||||
def validate
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ module DiasporaFederation
|
|||
<author>#{data[:author]}</author>
|
||||
<guid>#{data[:guid]}</guid>
|
||||
<created_at>#{data[:created_at].utc.iso8601}</created_at>
|
||||
<public>#{data[:public]}</public>
|
||||
<provider_display_name>#{data[:provider_display_name]}</provider_display_name>
|
||||
<text>#{data[:text]}</text>
|
||||
<photo>
|
||||
|
|
@ -50,7 +51,6 @@ module DiasporaFederation
|
|||
<lat>#{location.lat}</lat>
|
||||
<lng>#{location.lng}</lng>
|
||||
</location>
|
||||
<public>#{data[:public]}</public>
|
||||
</status_message>
|
||||
XML
|
||||
|
||||
|
|
@ -61,6 +61,7 @@ XML
|
|||
"author": "#{data[:author]}",
|
||||
"guid": "#{data[:guid]}",
|
||||
"created_at": "#{data[:created_at].utc.iso8601}",
|
||||
"public": #{data[:public]},
|
||||
"provider_display_name": "#{data[:provider_display_name]}",
|
||||
"text": "#{data[:text]}",
|
||||
"photos": [
|
||||
|
|
@ -102,8 +103,7 @@ XML
|
|||
"lat": "#{location.lat}",
|
||||
"lng": "#{location.lng}"
|
||||
}
|
||||
},
|
||||
"public": #{data[:public]}
|
||||
}
|
||||
}
|
||||
}
|
||||
JSON
|
||||
|
|
|
|||
Loading…
Reference in a new issue