mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-18 21:27:41 +00:00
122d59ac41
* Change ActivityPub paging to match spec. Clean up ActivityPub outbox changes. * Fix code style and test failures for OutboxController. * Attempt to fix CI errors.
13 lines
621 B
Ruby
13 lines
621 B
Ruby
extends 'activitypub/types/ordered_collection.activitystreams2.rabl'
|
|
|
|
object @account
|
|
|
|
node(:totalItems) { @statuses.count }
|
|
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(:name) { |account| t('activitypub.outbox.name', account_name: account_name(account)) }
|
|
node(:summary) { |account| t('activitypub.outbox.summary', account_name: account_name(account)) }
|
|
node(:updated) { |account| (@statuses.empty? ? account.created_at.to_time : @statuses.first.updated_at.to_time).xmlschema }
|