mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-26 00:58:47 -05:00
feffe23cc5
* Rearrange frontend to account for mailing list mode * Allow update of user preference for mailing list frequency * Add mailing list frequency estimate * Simplify frequency estimate; disable activity summary for mailing list mode * Remove combined updates * Add specs for enqueue mailing list mode job * Write mailing list method for mailer * Fix linting error * Account for stale topics * Add translations for default mailing list setting * One query for mailing list topics * Fix failing spec * WIP * Flesh out html template * First pass at text-based mailing list summary * Add user avatar * Properly format posts for mailing list * Move make_all_links_absolute into Email::Styles * Apply first_seen_at to user * Send mailing list email summary hourly based on first_seen_at * Branch and test cleanup * Use existing mailing list mode estimate * Fix failing specs
36 lines
1.1 KiB
Ruby
36 lines
1.1 KiB
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,
|
|
:edit_history_public,
|
|
:auto_track_topics_after_msecs,
|
|
:new_topic_duration_minutes,
|
|
:email_previous_replies,
|
|
:email_in_reply_to,
|
|
:like_notification_frequency,
|
|
:include_tl0_in_digests
|
|
|
|
|
|
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
|