Compatibility with phoenix_pubsub 2.0.0
authorMark Felder <feld@FreeBSD.org>
Wed, 7 Oct 2020 18:28:39 +0000 (13:28 -0500)
committerMark Felder <feld@FreeBSD.org>
Wed, 7 Oct 2020 18:28:39 +0000 (13:28 -0500)
lib/pleroma/application.ex
lib/pleroma/web/web.ex
test/support/channel_case.ex

index 02dd3993970dd3737eede97293fc7ed04684473d..fe94b56f4af129af269507cc89270857ec52fcc9 100644 (file)
@@ -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: []
index 4f9281851dd5d43a2f3812d49cd89a7a509ef320..c319d223c89b2bbc6195a047c1c09068ea3bde51 100644 (file)
@@ -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
index d63a0f06b20ff34704a2880370d45fa074e5cb16..114184a9f0b5520cd57a69b5d2991e1045ace1ae 100644 (file)
@@ -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