FEATURE: implements user based sidebar mode (#23078)

This commit is contained in:
Joffrey JAFFEUX
2023-08-18 20:33:07 +02:00
committed by GitHub
parent 82b16f4f47
commit b2b84cc957
31 changed files with 602 additions and 52 deletions

View File

@ -47,6 +47,7 @@ after_initialize do
UserUpdater::OPTION_ATTR.push(:ignore_channel_wide_mention)
UserUpdater::OPTION_ATTR.push(:chat_email_frequency)
UserUpdater::OPTION_ATTR.push(:chat_header_indicator_preference)
UserUpdater::OPTION_ATTR.push(:chat_separate_sidebar_mode)
register_reviewable_type Chat::ReviewableMessage
@ -297,6 +298,12 @@ after_initialize do
object.chat_header_indicator_preference
end
add_to_serializer(:user_option, :chat_separate_sidebar_mode) { object.chat_separate_sidebar_mode }
add_to_serializer(:current_user_option, :chat_separate_sidebar_mode) do
object.chat_separate_sidebar_mode
end
RETENTION_SETTINGS_TO_USER_OPTION_FIELDS = {
chat_channel_retention_days: :dismissed_channel_retention_reminder,
chat_dm_retention_days: :dismissed_dm_retention_reminder,