about summary refs log tree commit diff
path: root/app/views/api/activitypub/outbox/show_page.activitystreams2.rabl
diff options
context:
space:
mode:
authorEvan Minto <evan.minto@gmail.com>2017-04-25 06:06:06 -0700
committerEugen Rochko <eugen@zeonfederated.com>2017-04-25 15:06:06 +0200
commit122d59ac41a0c637b19357c2b7422002ffa0381c (patch)
tree150a8793fcc7d51793a24b2b1df900025799dc73 /app/views/api/activitypub/outbox/show_page.activitystreams2.rabl
parent8b5179d006a07cf759e751e9d883bfe472cee868 (diff)
Change ActivityPub paging to match spec. Clean up ActivityPub outbox changes. (#2410)
* Change ActivityPub paging to match spec. Clean up ActivityPub outbox changes.

* Fix code style and test failures for OutboxController.

* Attempt to fix CI errors.
Diffstat (limited to 'app/views/api/activitypub/outbox/show_page.activitystreams2.rabl')
-rw-r--r--app/views/api/activitypub/outbox/show_page.activitystreams2.rabl16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/api/activitypub/outbox/show_page.activitystreams2.rabl b/app/views/api/activitypub/outbox/show_page.activitystreams2.rabl
new file mode 100644
index 000000000..b6433ccf2
--- /dev/null
+++ b/app/views/api/activitypub/outbox/show_page.activitystreams2.rabl
@@ -0,0 +1,16 @@
+extends 'activitypub/types/ordered_collection_page.activitystreams2.rabl'
+
+object @account
+
+node(:items) do
+  @statuses.map { |status| api_activitypub_status_url(status) }
+end
+
+node(:next)       { @next_page_url } if @next_page_url
+node(:prev)       { @prev_page_url } if @prev_page_url
+node(:current)    { @first_page_url } if @first_page_url
+node(:first)      { @first_page_url } if @first_page_url
+node(:last)       { @last_page_url } if @last_page_url
+node(:partOf)     { @part_of_url } if @part_of_url
+
+node(:updated)    { |account| (@statuses.empty? ? account.created_at.to_time : @statuses.first.updated_at.to_time).xmlschema }