logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 6e1261f277411300e4f1d24f8c1b14ad1a165915
parent: 91d548f7e6a0947e80be1dd4d4341b1d99c461e4
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Fri,  7 Jul 2017 16:19:28 +0200

Fix notifications including wrong status in JSON (#4097)


Diffstat:

Mapp/serializers/rest/notification_serializer.rb2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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)