mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 11:12:23 +08:00
46b34e3c62
Users can no longer opt-in for "public" edit history if site owner disables it. This feature adds cost and complexity to post rendering since user options need to be premeptively loaded for every user in the stream. It is also confusing to explain to communities with private edit history.
32 lines
1008 B
Ruby
32 lines
1008 B
Ruby
class UserOptionSerializer < ApplicationSerializer
|
|
attributes :user_id,
|
|
:email_always,
|
|
:mailing_list_mode,
|
|
:mailing_list_mode_frequency,
|
|
:email_digests,
|
|
:email_private_messages,
|
|
:email_direct,
|
|
:external_links_in_new_tab,
|
|
:dynamic_favicon,
|
|
:enable_quoting,
|
|
:disable_jump_reply,
|
|
:digest_after_minutes,
|
|
:automatically_unpin_topics,
|
|
:auto_track_topics_after_msecs,
|
|
:new_topic_duration_minutes,
|
|
:email_previous_replies,
|
|
:email_in_reply_to,
|
|
:like_notification_frequency,
|
|
:include_tl0_in_digests
|
|
|
|
|
|
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
|
|
|
|
end
|