From 6e1261f277411300e4f1d24f8c1b14ad1a165915 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 7 Jul 2017 16:19:28 +0200 Subject: [PATCH] Fix notifications including wrong status in JSON (#4097) --- app/serializers/rest/notification_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/rest/notification_serializer.rb b/app/serializers/rest/notification_serializer.rb index 97fadf32..f95d099a 100644 --- a/app/serializers/rest/notification_serializer.rb +++ b/app/serializers/rest/notification_serializer.rb @@ -4,7 +4,7 @@ class REST::NotificationSerializer < ActiveModel::Serializer attributes :id, :type, :created_at belongs_to :from_account, key: :account, serializer: REST::AccountSerializer - belongs_to :status, if: :status_type?, serializer: REST::StatusSerializer + belongs_to :target_status, key: :status, if: :status_type?, serializer: REST::StatusSerializer def status_type? [:favourite, :reblog, :mention].include?(object.type)