discourse/plugins/chat/lib/extensions/user_option_extension.rb
Roman Rizzi 0a5f548635
DEV: Move discourse-chat to the core repo. (#18776)
As part of this move, we are also renaming `discourse-chat` to `chat`.
2022-11-02 10:41:30 -03:00

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