2016-02-17 15:46:19 +11:00
|
|
|
class UserOptionSerializer < ApplicationSerializer
|
|
|
|
attributes :user_id,
|
|
|
|
:email_always,
|
|
|
|
:mailing_list_mode,
|
2016-05-21 06:17:54 -07:00
|
|
|
:mailing_list_mode_frequency,
|
2016-02-17 15:46:19 +11:00
|
|
|
:email_digests,
|
|
|
|
:email_private_messages,
|
|
|
|
:email_direct,
|
|
|
|
:external_links_in_new_tab,
|
|
|
|
:dynamic_favicon,
|
|
|
|
:enable_quoting,
|
|
|
|
:disable_jump_reply,
|
2016-03-02 15:26:27 -05:00
|
|
|
:digest_after_minutes,
|
2016-02-17 15:46:19 +11:00
|
|
|
:automatically_unpin_topics,
|
2016-02-18 16:57:22 +11:00
|
|
|
:auto_track_topics_after_msecs,
|
2016-09-30 12:36:43 -04:00
|
|
|
:notification_level_when_replying,
|
2016-02-19 13:56:52 +11:00
|
|
|
:new_topic_duration_minutes,
|
2016-02-26 00:05:40 +11:00
|
|
|
:email_previous_replies,
|
2016-03-02 23:16:52 +11:00
|
|
|
:email_in_reply_to,
|
2016-03-17 17:35:23 -04:00
|
|
|
:like_notification_frequency,
|
2017-05-12 12:41:26 -04:00
|
|
|
:include_tl0_in_digests,
|
2017-05-15 12:48:08 -04:00
|
|
|
:theme_key,
|
2017-10-06 15:56:58 +08:00
|
|
|
:theme_key_seq,
|
|
|
|
:allow_private_messages,
|
2017-11-09 12:45:19 -07:00
|
|
|
:homepage_id,
|
2016-02-17 15:46:19 +11:00
|
|
|
|
2016-02-18 16:57:22 +11:00
|
|
|
def auto_track_topics_after_msecs
|
|
|
|
object.auto_track_topics_after_msecs || SiteSetting.default_other_auto_track_topics_after_msecs
|
|
|
|
end
|
|
|
|
|
2016-09-30 12:36:43 -04:00
|
|
|
def notification_level_when_replying
|
|
|
|
object.notification_level_when_replying || SiteSetting.default_other_notification_level_when_replying
|
|
|
|
end
|
|
|
|
|
2016-02-18 16:57:22 +11:00
|
|
|
def new_topic_duration_minutes
|
|
|
|
object.new_topic_duration_minutes || SiteSetting.default_other_new_topic_duration_minutes
|
|
|
|
end
|
|
|
|
|
2017-05-12 12:41:26 -04:00
|
|
|
def theme_key
|
|
|
|
object.theme_key || SiteSetting.default_theme_key
|
|
|
|
end
|
|
|
|
|
2016-02-17 15:46:19 +11:00
|
|
|
end
|