mirror of
https://github.com/discourse/discourse.git
synced 2024-12-25 03:04:13 +08:00
616885895a
When setting DISCOURSE_ZEITWERK_EAGER_LOAD=1 to enable
eager loading the previous solution to adding chat_levels
to the core NotificationLevels would break with a module
loading error (c.f. cc2570fce3
)
We don't actually _need_ to extend the core class, we can just
make our own for chat, let's do this instead.
10 lines
183 B
Ruby
10 lines
183 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Chat
|
|
class NotificationLevels
|
|
def self.all
|
|
@all_levels ||= Enum.new(muted: 0, normal: 1, tracking: 2, watching: 3)
|
|
end
|
|
end
|
|
end
|