Skip to content
Snippets Groups Projects
Commit 6e1261f2 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix notifications including wrong status in JSON (#4097)

parent 91d548f7
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment