Merge remote-tracking branch 'parent/main' into upstream-20240326
This commit is contained in:
commit
6c9b221cb2
263 changed files with 4628 additions and 1518 deletions
|
@ -19,7 +19,6 @@ class InitialStateSerializer < ActiveModel::Serializer
|
|||
|
||||
if object.current_account
|
||||
store[:me] = object.current_account.id.to_s
|
||||
store[:unfollow_modal] = object_account_user.setting_unfollow_modal
|
||||
store[:boost_modal] = object_account_user.setting_boost_modal
|
||||
store[:delete_modal] = object_account_user.setting_delete_modal
|
||||
store[:auto_play_gif] = object_account_user.setting_auto_play_gif
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class REST::AccountRelationshipSeveranceEventSerializer < ActiveModel::Serializer
|
||||
attributes :id, :type, :purged, :target_name, :followers_count, :following_count, :created_at
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
end
|
||||
end
|
|
@ -9,6 +9,7 @@ class REST::NotificationSerializer < ActiveModel::Serializer
|
|||
belongs_to :emoji_reaction, if: :emoji_reaction_type?, serializer: REST::NotifyEmojiReactionSerializer
|
||||
belongs_to :account_warning, if: :warning_type?, serializer: REST::AccountWarningSerializer
|
||||
belongs_to :list, if: :list_status_type?, serializer: REST::ListSerializer
|
||||
belongs_to :account_relationship_severance_event, key: :event, if: :relationship_severance_event?, serializer: REST::AccountRelationshipSeveranceEventSerializer
|
||||
|
||||
def id
|
||||
object.id.to_s
|
||||
|
@ -37,4 +38,8 @@ class REST::NotificationSerializer < ActiveModel::Serializer
|
|||
def list
|
||||
object.list_status.list
|
||||
end
|
||||
|
||||
def relationship_severance_event?
|
||||
object.type == :severed_relationships
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue