discourse/app/serializers/user_option_serializer.rb
Sam Saffron 820a435af8 FEATURE: add "email in-reply-to user option"
We no longer include previous replies as "context", instead
we include and excerpt of the post being replied to at the bottom
of notifications, this information was previously missing.

Users may opt in to emailing previous replies if they wish
or opt out of "in-reply-to" which makes sense in some email clients that
are smarter about displaying a tree of replies.
2016-02-26 00:05:59 +11:00

33 lines
1,006 B
Ruby

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,
:digest_after_days,
:automatically_unpin_topics,
:edit_history_public,
:auto_track_topics_after_msecs,
:new_topic_duration_minutes,
:email_previous_replies,
:email_in_reply_to
def include_edit_history_public?
!SiteSetting.edit_history_visible_to_public
end
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