X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fgun%2Fgun.ex;h=4043e488047a0716db3fa6f1b2250e529fe30106;hb=aee815b478aea5d74959c5a445c6c5d87f25168e;hp=35390bb11ee845aa35c6b8faa5dcd33131270d63;hpb=4427161ca3798aeee0290f0ed7ac5536039509d8;p=akkoma
diff --git a/lib/pleroma/gun/gun.ex b/lib/pleroma/gun/gun.ex
index 35390bb11..4043e4880 100644
--- a/lib/pleroma/gun/gun.ex
+++ b/lib/pleroma/gun/gun.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Gun do
@@ -11,6 +11,10 @@ defmodule Pleroma.Gun do
@callback await(pid(), reference()) :: {:response, :fin, 200, []}
@callback set_owner(pid(), pid()) :: :ok
+ @api Pleroma.Config.get([Pleroma.Gun], Pleroma.Gun.API)
+
+ defp api, do: @api
+
def open(host, port, opts), do: api().open(host, port, opts)
def info(pid), do: api().info(pid)
@@ -24,6 +28,4 @@ defmodule Pleroma.Gun do
def await(pid, ref), do: api().await(pid, ref)
def set_owner(pid, owner), do: api().set_owner(pid, owner)
-
- defp api, do: Pleroma.Config.get([Pleroma.Gun], Pleroma.Gun.API)
end