aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/application.ex
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2018-02-11 09:50:55 +0100
committerRoger Braun <roger@rogerbraun.net>2018-02-11 09:50:55 +0100
commit52200998c997576c9008cbe50b0a7b9f0e6134cc (patch)
treec0d68f476442b8dd86fca1e182d5c09553800810 /lib/pleroma/application.ex
parent4a13b8488787773d09f67d1a436d5906e2f5b171 (diff)
parent0e2ca77eec511857508208d3faeb9217c4496f8a (diff)
downloadpleroma-52200998c997576c9008cbe50b0a7b9f0e6134cc.tar.gz
Merge branch 'develop' into feature/activitypub
Diffstat (limited to 'lib/pleroma/application.ex')
-rw-r--r--lib/pleroma/application.ex7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex
index 2969ca3c4..79b9dee9d 100644
--- a/lib/pleroma/application.ex
+++ b/lib/pleroma/application.ex
@@ -20,13 +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