about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/accounts/show.activitystreams2.rabl9
-rw-r--r--app/views/activitypub/base.activitystreams2.rabl1
-rw-r--r--app/views/activitypub/intransient.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/announce.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/collection.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/create.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/note.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/ordered_collection.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl3
-rw-r--r--app/views/activitypub/types/person.activitystreams2.rabl3
-rw-r--r--app/views/api/activitypub/activities/_show_status.activitystreams2.rabl4
-rw-r--r--app/views/api/activitypub/activities/show_status_announce.activitystreams2.rabl8
-rw-r--r--app/views/api/activitypub/activities/show_status_create.activitystreams2.rabl8
-rw-r--r--app/views/api/activitypub/notes/show.activitystreams2.rabl11
-rw-r--r--app/views/api/activitypub/outbox/show.activitystreams2.rabl12
-rw-r--r--app/views/api/activitypub/outbox/show_page.activitystreams2.rabl16
-rw-r--r--app/views/well_known/webfinger/show.json.rabl6
-rw-r--r--app/views/well_known/webfinger/show.xml.ruby5
18 files changed, 6 insertions, 98 deletions
diff --git a/app/views/accounts/show.activitystreams2.rabl b/app/views/accounts/show.activitystreams2.rabl
deleted file mode 100644
index 2c0a4ad3a..000000000
--- a/app/views/accounts/show.activitystreams2.rabl
+++ /dev/null
@@ -1,9 +0,0 @@
-extends 'activitypub/types/person.activitystreams2.rabl'
-
-object @account
-
-attributes display_name: :name, username: :preferredUsername, note: :summary
-
-node(:icon)   { |account| full_asset_url(account.avatar.url(:original)) }
-node(:image)  { |account| full_asset_url(account.header.url(:original)) }
-node(:outbox) { |account| api_activitypub_outbox_url(account.id) }
diff --git a/app/views/activitypub/base.activitystreams2.rabl b/app/views/activitypub/base.activitystreams2.rabl
deleted file mode 100644
index c5e94997a..000000000
--- a/app/views/activitypub/base.activitystreams2.rabl
+++ /dev/null
@@ -1 +0,0 @@
-node(:'@context') { 'https://www.w3.org/ns/activitystreams' }
diff --git a/app/views/activitypub/intransient.activitystreams2.rabl b/app/views/activitypub/intransient.activitystreams2.rabl
deleted file mode 100644
index 968e451c2..000000000
--- a/app/views/activitypub/intransient.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/base.activitystreams2.rabl'
-
-node(:id) { request.original_url }
diff --git a/app/views/activitypub/types/announce.activitystreams2.rabl b/app/views/activitypub/types/announce.activitystreams2.rabl
deleted file mode 100644
index 4a29aa134..000000000
--- a/app/views/activitypub/types/announce.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/intransient.activitystreams2.rabl'
-
-node(:type) { 'Announce' }
diff --git a/app/views/activitypub/types/collection.activitystreams2.rabl b/app/views/activitypub/types/collection.activitystreams2.rabl
deleted file mode 100644
index cc0e532b7..000000000
--- a/app/views/activitypub/types/collection.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/intransient.activitystreams2.rabl'
-
-node(:type) { 'Collection' }
diff --git a/app/views/activitypub/types/create.activitystreams2.rabl b/app/views/activitypub/types/create.activitystreams2.rabl
deleted file mode 100644
index e41a056a7..000000000
--- a/app/views/activitypub/types/create.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/intransient.activitystreams2.rabl'
-
-node(:type) { 'Create' }
diff --git a/app/views/activitypub/types/note.activitystreams2.rabl b/app/views/activitypub/types/note.activitystreams2.rabl
deleted file mode 100644
index 39c74d4ba..000000000
--- a/app/views/activitypub/types/note.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/intransient.activitystreams2.rabl'
-
-node(:type) { 'Note' }
diff --git a/app/views/activitypub/types/ordered_collection.activitystreams2.rabl b/app/views/activitypub/types/ordered_collection.activitystreams2.rabl
deleted file mode 100644
index 2cda6f4d0..000000000
--- a/app/views/activitypub/types/ordered_collection.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/types/collection.activitystreams2.rabl'
-
-node(:type) { 'OrderedCollection' }
diff --git a/app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl b/app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl
deleted file mode 100644
index 9937d11e9..000000000
--- a/app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/types/ordered_collection.activitystreams2.rabl'
-
-node(:type) { 'OrderedCollectionPage' }
diff --git a/app/views/activitypub/types/person.activitystreams2.rabl b/app/views/activitypub/types/person.activitystreams2.rabl
deleted file mode 100644
index 487a60791..000000000
--- a/app/views/activitypub/types/person.activitystreams2.rabl
+++ /dev/null
@@ -1,3 +0,0 @@
-extends 'activitypub/intransient.activitystreams2.rabl'
-
-node(:type) { 'Person' }
diff --git a/app/views/api/activitypub/activities/_show_status.activitystreams2.rabl b/app/views/api/activitypub/activities/_show_status.activitystreams2.rabl
deleted file mode 100644
index 472bf5dbd..000000000
--- a/app/views/api/activitypub/activities/_show_status.activitystreams2.rabl
+++ /dev/null
@@ -1,4 +0,0 @@
-object @status
-
-node(:actor)     { |status| TagManager.instance.url_for(status.account) }
-node(:published) { |status| status.created_at.to_time.xmlschema }
\ No newline at end of file
diff --git a/app/views/api/activitypub/activities/show_status_announce.activitystreams2.rabl b/app/views/api/activitypub/activities/show_status_announce.activitystreams2.rabl
deleted file mode 100644
index 44ac1ba2f..000000000
--- a/app/views/api/activitypub/activities/show_status_announce.activitystreams2.rabl
+++ /dev/null
@@ -1,8 +0,0 @@
-extends 'activitypub/types/announce.activitystreams2.rabl'
-extends 'api/activitypub/activities/_show_status.activitystreams2.rabl'
-
-object @status
-
-node(:name)   { |status| t('activitypub.activity.announce.name', account_name: account_name(status.account)) }
-node(:url)    { |status| TagManager.instance.url_for(status) }
-node(:object) { |status| api_activitypub_status_url(status.reblog_of_id) }
diff --git a/app/views/api/activitypub/activities/show_status_create.activitystreams2.rabl b/app/views/api/activitypub/activities/show_status_create.activitystreams2.rabl
deleted file mode 100644
index ff4d39eca..000000000
--- a/app/views/api/activitypub/activities/show_status_create.activitystreams2.rabl
+++ /dev/null
@@ -1,8 +0,0 @@
-extends 'activitypub/types/create.activitystreams2.rabl'
-extends 'api/activitypub/activities/_show_status.activitystreams2.rabl'
-
-object @status
-
-node(:name)   { |status| t('activitypub.activity.create.name', account_name: account_name(status.account)) }
-node(:url)    { |status| TagManager.instance.url_for(status) }
-node(:object) { |status| api_activitypub_note_url(status) }
diff --git a/app/views/api/activitypub/notes/show.activitystreams2.rabl b/app/views/api/activitypub/notes/show.activitystreams2.rabl
deleted file mode 100644
index d962f4438..000000000
--- a/app/views/api/activitypub/notes/show.activitystreams2.rabl
+++ /dev/null
@@ -1,11 +0,0 @@
-extends 'activitypub/types/note.activitystreams2.rabl'
-
-object @status
-
-attributes :content
-
-node(:name)         { |status| status.content }
-node(:url)          { |status| TagManager.instance.url_for(status) }
-node(:attributedTo) { |status| TagManager.instance.url_for(status.account) }
-node(:inReplyTo)    { |status| api_activitypub_note_url(status.thread) } if @status.thread
-node(:published)    { |status| status.created_at.to_time.xmlschema }
diff --git a/app/views/api/activitypub/outbox/show.activitystreams2.rabl b/app/views/api/activitypub/outbox/show.activitystreams2.rabl
deleted file mode 100644
index 273b15e82..000000000
--- a/app/views/api/activitypub/outbox/show.activitystreams2.rabl
+++ /dev/null
@@ -1,12 +0,0 @@
-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 }
diff --git a/app/views/api/activitypub/outbox/show_page.activitystreams2.rabl b/app/views/api/activitypub/outbox/show_page.activitystreams2.rabl
deleted file mode 100644
index b6433ccf2..000000000
--- a/app/views/api/activitypub/outbox/show_page.activitystreams2.rabl
+++ /dev/null
@@ -1,16 +0,0 @@
-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 }
diff --git a/app/views/well_known/webfinger/show.json.rabl b/app/views/well_known/webfinger/show.json.rabl
index 123d1d11a..af11cd207 100644
--- a/app/views/well_known/webfinger/show.json.rabl
+++ b/app/views/well_known/webfinger/show.json.rabl
@@ -3,14 +3,14 @@ object @account
 node(:subject) { @canonical_account_uri }
 
 node(:aliases) do
-  [TagManager.instance.url_for(@account), TagManager.instance.uri_for(@account)]
+  [short_account_url(@account), account_url(@account)]
 end
 
 node(:links) do
   [
-    { rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: TagManager.instance.url_for(@account) },
+    { rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: account_url(@account) },
     { rel: 'http://schemas.google.com/g/2010#updates-from', type: 'application/atom+xml', href: account_url(@account, format: 'atom') },
-    { rel: 'self', type: 'application/activity+json', href: TagManager.instance.url_for(@account) },
+    { rel: 'self', type: 'application/activity+json', href: account_url(@account) },
     { rel: 'salmon', href: api_salmon_url(@account.id) },
     { rel: 'magic-public-key', href: "data:application/magic-public-key,#{@magic_key}" },
     { rel: 'http://ostatus.org/schema/1.0/subscribe', template: "#{authorize_follow_url}?acct={uri}" },
diff --git a/app/views/well_known/webfinger/show.xml.ruby b/app/views/well_known/webfinger/show.xml.ruby
index fc0ab5b84..844742d68 100644
--- a/app/views/well_known/webfinger/show.xml.ruby
+++ b/app/views/well_known/webfinger/show.xml.ruby
@@ -1,10 +1,11 @@
 Nokogiri::XML::Builder.new do |xml|
   xml.XRD(xmlns: 'http://docs.oasis-open.org/ns/xri/xrd-1.0') do
     xml.Subject @canonical_account_uri
-    xml.Alias TagManager.instance.url_for(@account)
-    xml.Alias TagManager.instance.uri_for(@account)
+    xml.Alias short_account_url(@account)
+    xml.Alias account_url(@account)
     xml.Link(rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: TagManager.instance.url_for(@account))
     xml.Link(rel: 'http://schemas.google.com/g/2010#updates-from', type: 'application/atom+xml', href: account_url(@account, format: 'atom'))
+    xml.Link(rel: 'self', type: 'application/activity+json', href: account_url(@account))
     xml.Link(rel: 'salmon', href: api_salmon_url(@account.id))
     xml.Link(rel: 'magic-public-key', href: "data:application/magic-public-key,#{@magic_key}")
     xml.Link(rel: 'http://ostatus.org/schema/1.0/subscribe', template: "#{authorize_follow_url}?acct={uri}")