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
|
# Post entity creation time
|
||||||
# @return [Time] 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
|
# @!attribute [r] provider_display_name
|
||||||
# A string that describes a means by which a user has posted the post
|
# A string that describes a means by which a user has posted the post
|
||||||
# @return [String] provider display name
|
# @return [String] provider display name
|
||||||
|
|
@ -29,6 +33,7 @@ module DiasporaFederation
|
||||||
property :author, :string, xml_name: :diaspora_handle
|
property :author, :string, xml_name: :diaspora_handle
|
||||||
property :guid, :string
|
property :guid, :string
|
||||||
property :created_at, :timestamp, default: -> { Time.now.utc }
|
property :created_at, :timestamp, default: -> { Time.now.utc }
|
||||||
|
property :public, :boolean, default: false
|
||||||
property :provider_display_name, :string, optional: true
|
property :provider_display_name, :string, optional: true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,6 @@ module DiasporaFederation
|
||||||
# @return [Entities::Event] event
|
# @return [Entities::Event] event
|
||||||
entity :event, Entities::Event, optional: true
|
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
|
private
|
||||||
|
|
||||||
def validate
|
def validate
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ module DiasporaFederation
|
||||||
<author>#{data[:author]}</author>
|
<author>#{data[:author]}</author>
|
||||||
<guid>#{data[:guid]}</guid>
|
<guid>#{data[:guid]}</guid>
|
||||||
<created_at>#{data[:created_at].utc.iso8601}</created_at>
|
<created_at>#{data[:created_at].utc.iso8601}</created_at>
|
||||||
|
<public>#{data[:public]}</public>
|
||||||
<provider_display_name>#{data[:provider_display_name]}</provider_display_name>
|
<provider_display_name>#{data[:provider_display_name]}</provider_display_name>
|
||||||
<text>#{data[:text]}</text>
|
<text>#{data[:text]}</text>
|
||||||
<photo>
|
<photo>
|
||||||
|
|
@ -50,7 +51,6 @@ module DiasporaFederation
|
||||||
<lat>#{location.lat}</lat>
|
<lat>#{location.lat}</lat>
|
||||||
<lng>#{location.lng}</lng>
|
<lng>#{location.lng}</lng>
|
||||||
</location>
|
</location>
|
||||||
<public>#{data[:public]}</public>
|
|
||||||
</status_message>
|
</status_message>
|
||||||
XML
|
XML
|
||||||
|
|
||||||
|
|
@ -61,6 +61,7 @@ XML
|
||||||
"author": "#{data[:author]}",
|
"author": "#{data[:author]}",
|
||||||
"guid": "#{data[:guid]}",
|
"guid": "#{data[:guid]}",
|
||||||
"created_at": "#{data[:created_at].utc.iso8601}",
|
"created_at": "#{data[:created_at].utc.iso8601}",
|
||||||
|
"public": #{data[:public]},
|
||||||
"provider_display_name": "#{data[:provider_display_name]}",
|
"provider_display_name": "#{data[:provider_display_name]}",
|
||||||
"text": "#{data[:text]}",
|
"text": "#{data[:text]}",
|
||||||
"photos": [
|
"photos": [
|
||||||
|
|
@ -102,8 +103,7 @@ XML
|
||||||
"lat": "#{location.lat}",
|
"lat": "#{location.lat}",
|
||||||
"lng": "#{location.lng}"
|
"lng": "#{location.lng}"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"public": #{data[:public]}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
JSON
|
JSON
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue