Add reaction deck

This commit is contained in:
KMY 2023-05-26 15:15:48 +09:00
parent db5c358f4f
commit f1625fe101
24 changed files with 404 additions and 13 deletions

View file

@ -44,6 +44,7 @@ class InitialStateSerializer < ActiveModel::Serializer
store[:display_media_expand] = object.current_account.user.setting_display_media_expand
store[:expand_spoilers] = object.current_account.user.setting_expand_spoilers
store[:enable_login_privacy] = object.current_account.user.setting_enable_login_privacy
store[:hide_recent_emojis] = object.current_account.user.setting_hide_recent_emojis
store[:reduce_motion] = object.current_account.user.setting_reduce_motion
store[:disable_swiping] = object.current_account.user.setting_disable_swiping
store[:advanced_layout] = object.current_account.user.setting_advanced_layout

View file

@ -85,6 +85,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer
max_reactions_per_account: EmojiReaction::EMOJI_REACTION_PER_ACCOUNT_LIMIT,
},
reaction_deck: {
max_items: 16,
},
reactions: {
max_reactions: EmojiReaction::EMOJI_REACTION_PER_ACCOUNT_LIMIT,
},
@ -110,6 +114,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
:kmyblue_searchability,
:searchability,
:kmyblue_markdown,
:kmyblue_reaction_deck,
]
capabilities << :profile_search unless Chewy.enabled?

View file

@ -91,6 +91,10 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
max_reactions_per_account: EmojiReaction::EMOJI_REACTION_PER_ACCOUNT_LIMIT,
},
reaction_deck: {
max_items: 16,
},
reactions: {
max_reactions: EmojiReaction::EMOJI_REACTION_PER_ACCOUNT_LIMIT,
},
@ -119,6 +123,7 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
:kmyblue_searchability,
:searchability,
:kmyblue_markdown,
:kmyblue_reaction_deck,
]
capabilities << :profile_search unless Chewy.enabled?