Add config option for enabling/disabling chat.
[akkoma] / lib / pleroma / web / channels / user_socket.ex
index 4a9bb8e2245a8ceabcabe8996bfb8334ff6617d5..f18b3cb80d78bf140010030aa73817a8efe75d83 100644 (file)
@@ -5,7 +5,9 @@ defmodule Pleroma.Web.UserSocket do
 
   ## Channels
   # channel "room:*", Pleroma.Web.RoomChannel
-  channel "chat:*", Pleroma.Web.ChatChannel
+  if Application.get_env(:pleroma, :chat) |> Keyword.get(:enabled) do
+    channel "chat:*", Pleroma.Web.ChatChannel
+  end
 
   ## Transports
   transport :websocket, Phoenix.Transports.WebSocket