mirror of
https://github.com/discourse/discourse.git
synced 2024-12-12 01:15:48 +08:00
0a5f548635
As part of this move, we are also renaming `discourse-chat` to `chat`.
14 lines
291 B
Ruby
14 lines
291 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Chat::Api < Chat::ChatBaseController
|
|
before_action :ensure_logged_in
|
|
before_action :ensure_can_chat
|
|
|
|
private
|
|
|
|
def ensure_can_chat
|
|
raise Discourse::NotFound unless SiteSetting.chat_enabled
|
|
guardian.ensure_can_chat!(current_user)
|
|
end
|
|
end
|