From: Eugen Rochko Date: Fri, 7 Jul 2017 14:19:28 +0000 (+0200) Subject: Fix notifications including wrong status in JSON (#4097) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=6e1261f277411300e4f1d24f8c1b14ad1a165915;p=mastodon.git Fix notifications including wrong status in JSON (#4097) --- diff --git a/app/serializers/rest/notification_serializer.rb b/app/serializers/rest/notification_serializer.rb index 97fadf32e..f95d099a3 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)