2016-02-16 23:46:19 -05:00
|
|
|
class UserOptionSerializer < ApplicationSerializer
|
|
|
|
attributes :user_id,
|
|
|
|
:email_always,
|
|
|
|
:mailing_list_mode,
|
|
|
|
: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-16 23:46:19 -05:00
|
|
|
:automatically_unpin_topics,
|
2016-02-18 00:57:22 -05:00
|
|
|
:edit_history_public,
|
|
|
|
:auto_track_topics_after_msecs,
|
2016-02-18 21:56:52 -05:00
|
|
|
:new_topic_duration_minutes,
|
2016-02-25 08:05:40 -05:00
|
|
|
:email_previous_replies,
|
2016-03-02 07:16:52 -05:00
|
|
|
:email_in_reply_to,
|
|
|
|
:like_notification_frequency
|
2016-02-16 23:46:19 -05:00
|
|
|
|
|
|
|
|
|
|
|
def include_edit_history_public?
|
|
|
|
!SiteSetting.edit_history_visible_to_public
|
|
|
|
end
|
2016-02-18 00:57:22 -05:00
|
|
|
|
|
|
|
def auto_track_topics_after_msecs
|
|
|
|
object.auto_track_topics_after_msecs || SiteSetting.default_other_auto_track_topics_after_msecs
|
|
|
|
end
|
|
|
|
|
|
|
|
def new_topic_duration_minutes
|
|
|
|
object.new_topic_duration_minutes || SiteSetting.default_other_new_topic_duration_minutes
|
|
|
|
end
|
|
|
|
|
2016-02-16 23:46:19 -05:00
|
|
|
end
|