X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fapplication.ex;h=79b9dee9d2412194f55dd50d5bb12182e953a338;hb=8a47974217de4f714af11de7e5cb9b13e074d6ba;hp=cdfca8b1a1cafdcc23e571d3d4ffd644a9eb2907;hpb=46c8f79cd7083e820ee0286d7a38e314423b4727;p=akkoma diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex index cdfca8b1a..79b9dee9d 100644 --- a/lib/pleroma/application.ex +++ b/lib/pleroma/application.ex @@ -20,14 +20,18 @@ defmodule Pleroma.Application do limit: 2500 ]]), worker(Pleroma.Web.Federator, []), - worker(Pleroma.Web.ChatChannel.ChatChannelState, []), worker(Pleroma.Stats, []), ] ++ if Mix.env == :test, do: [], else: [worker(Pleroma.Web.Streamer, [])] + ++ if !chat_enabled(), do: [], else: [worker(Pleroma.Web.ChatChannel.ChatChannelState, [])] # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html # for other strategies and supported options opts = [strategy: :one_for_one, name: Pleroma.Supervisor] Supervisor.start_link(children, opts) end + + defp chat_enabled do + Application.get_env(:pleroma, :chat, []) |> Keyword.get(:enabled) + end end