about summary refs log tree commit diff
path: root/app/views/api/v1/notifications/show.rabl
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-20 00:33:02 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-20 19:39:58 +0100
commitda2ef4d676ff71e6ab3edf8d1a7cee8bf6b6d353 (patch)
treef73fa34a3323a70d5dcba360f781bce5325e3ed1 /app/views/api/v1/notifications/show.rabl
parent3838e6836d47797a4e8ca20afa70eebefb68da26 (diff)
Adding unified streamable notifications
Diffstat (limited to 'app/views/api/v1/notifications/show.rabl')
-rw-r--r--app/views/api/v1/notifications/show.rabl11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/views/api/v1/notifications/show.rabl b/app/views/api/v1/notifications/show.rabl
new file mode 100644
index 000000000..fe2218ed7
--- /dev/null
+++ b/app/views/api/v1/notifications/show.rabl
@@ -0,0 +1,11 @@
+object @notification
+
+attributes :id, :type
+
+child from_account: :account do
+  extends 'api/v1/accounts/show'
+end
+
+node(:status, if: lambda { |n| [:favourite, :reblog, :mention].include?(n.type) }) do |n|
+  partial 'api/v1/statuses/show', object: n.target_status
+end