start PubSub with chat
This commit is contained in:
parent
12e32e976f
commit
90a2b50673
@ -75,7 +75,6 @@ defmodule Pleroma.Application.StartUpDependencies do
|
|||||||
]
|
]
|
||||||
|> add_cachex_deps()
|
|> add_cachex_deps()
|
||||||
|> maybe_add_init_internal_fetch_actor_task(env)
|
|> maybe_add_init_internal_fetch_actor_task(env)
|
||||||
|> maybe_add_pub_sub()
|
|
||||||
|> maybe_add_backgroud_migrator()
|
|> maybe_add_backgroud_migrator()
|
||||||
|> start_while(fun)
|
|> start_while(fun)
|
||||||
end
|
end
|
||||||
@ -179,15 +178,10 @@ defmodule Pleroma.Application.StartUpDependencies do
|
|||||||
|
|
||||||
defp maybe_add_chat_child(children) do
|
defp maybe_add_chat_child(children) do
|
||||||
if Config.get([:chat, :enabled]) do
|
if Config.get([:chat, :enabled]) do
|
||||||
[Pleroma.Web.ChatChannel.ChatChannelState | children]
|
[
|
||||||
else
|
Pleroma.Web.ChatChannel.ChatChannelState,
|
||||||
children
|
{Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]} | children
|
||||||
end
|
]
|
||||||
end
|
|
||||||
|
|
||||||
defp maybe_add_pub_sub(children) do
|
|
||||||
if Config.get([:chat, :enabled]) do
|
|
||||||
[{Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]} | children]
|
|
||||||
else
|
else
|
||||||
children
|
children
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user