mirror of
https://github.com/discourse/discourse.git
synced 2024-12-13 13:13:44 +08:00
0a5f548635
As part of this move, we are also renaming `discourse-chat` to `chat`.
19 lines
571 B
Ruby
19 lines
571 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Chat::UserOptionExtension
|
|
# TODO: remove last_emailed_for_chat and chat_isolated in 2023
|
|
def self.prepended(base)
|
|
if base.ignored_columns
|
|
base.ignored_columns = base.ignored_columns + %i[last_emailed_for_chat chat_isolated]
|
|
else
|
|
base.ignored_columns = %i[last_emailed_for_chat chat_isolated]
|
|
end
|
|
|
|
def base.chat_email_frequencies
|
|
@chat_email_frequencies ||= { never: 0, when_away: 1 }
|
|
end
|
|
|
|
base.enum :chat_email_frequency, base.chat_email_frequencies, prefix: "send_chat_email"
|
|
end
|
|
end
|