aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-10-07 13:28:39 -0500
committerMark Felder <feld@FreeBSD.org>2020-10-07 13:28:39 -0500
commit8156940a49df17c00c05bfe60223b165f9dc034b (patch)
treeb415604986f4def1e911c42b28235b75597738f3
parent70880d54f85a96d07b6c72adfbf3f1a7c50f95a2 (diff)
downloadpleroma-8156940a49df17c00c05bfe60223b165f9dc034b.tar.gz
Compatibility with phoenix_pubsub 2.0.0
-rw-r--r--lib/pleroma/application.ex5
-rw-r--r--lib/pleroma/web/web.ex2
-rw-r--r--test/support/channel_case.ex2
3 files changed, 6 insertions, 3 deletions
diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex
index 02dd39939..fe94b56f4 100644
--- a/lib/pleroma/application.ex
+++ b/lib/pleroma/application.ex
@@ -202,7 +202,10 @@ defmodule Pleroma.Application do
end
defp chat_child(true) do
- [Pleroma.Web.ChatChannel.ChatChannelState]
+ [
+ Pleroma.Web.ChatChannel.ChatChannelState,
+ {Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]}
+ ]
end
defp chat_child(_), do: []
diff --git a/lib/pleroma/web/web.ex b/lib/pleroma/web/web.ex
index 4f9281851..c319d223c 100644
--- a/lib/pleroma/web/web.ex
+++ b/lib/pleroma/web/web.ex
@@ -177,7 +177,7 @@ defmodule Pleroma.Web do
def channel do
quote do
# credo:disable-for-next-line Credo.Check.Consistency.MultiAliasImportRequireUse
- use Phoenix.Channel
+ import Phoenix.Channel
import Pleroma.Web.Gettext
end
end
diff --git a/test/support/channel_case.ex b/test/support/channel_case.ex
index d63a0f06b..114184a9f 100644
--- a/test/support/channel_case.ex
+++ b/test/support/channel_case.ex
@@ -22,7 +22,7 @@ defmodule Pleroma.Web.ChannelCase do
using do
quote do
# Import conveniences for testing with channels
- use Phoenix.ChannelTest
+ import Phoenix.ChannelTest
use Pleroma.Tests.Helpers
# The default endpoint for testing