diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-20 00:33:02 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-20 19:39:58 +0100 |
commit | da2ef4d676ff71e6ab3edf8d1a7cee8bf6b6d353 (patch) | |
tree | f73fa34a3323a70d5dcba360f781bce5325e3ed1 /app/views | |
parent | 3838e6836d47797a4e8ca20afa70eebefb68da26 (diff) |
Adding unified streamable notifications
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/api/v1/notifications/index.rabl | 2 | ||||
-rw-r--r-- | app/views/api/v1/notifications/show.rabl | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/app/views/api/v1/notifications/index.rabl b/app/views/api/v1/notifications/index.rabl new file mode 100644 index 000000000..6abc3da36 --- /dev/null +++ b/app/views/api/v1/notifications/index.rabl @@ -0,0 +1,2 @@ +collection @notifications +extends 'api/v1/notifications/show' 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 |