akkounts/app/controllers/services/chat_controller.rb
Râu Cao 0e3180602c
Rename "xmpp" user service back to "ejabberd"
If we ever add support for others, we can combine them as "xmpp" in
helper methods
2024-09-04 13:03:45 +02:00

15 lines
339 B
Ruby

class Services::ChatController < Services::BaseController
before_action :authenticate_user!
before_action :require_service_available
def show
@service_enabled = current_user.service_enabled?(:ejabberd)
end
private
def require_service_available
http_status :not_found unless Setting.ejabberd_enabled?
end
end