diff options
Diffstat (limited to 'lib/plugins/link/redacted.ex')
-rw-r--r-- | lib/plugins/link/redacted.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/plugins/link/redacted.ex b/lib/plugins/link/redacted.ex index a7cfe74..0c14520 100644 --- a/lib/plugins/link/redacted.ex +++ b/lib/plugins/link/redacted.ex @@ -2,7 +2,10 @@ defmodule Nola.Plugins.Link.Redacted do @behaviour Nola.Plugins.Link @impl true - def match(uri = %URI{host: "redacted.ch", path: "/torrent.php", query: query = "id="<>id}, _opts) do + def match( + uri = %URI{host: "redacted.ch", path: "/torrent.php", query: query = "id=" <> id}, + _opts + ) do %{"id" => id} = URI.decode_query(id) {true, %{torrent: id}} end @@ -14,5 +17,4 @@ defmodule Nola.Plugins.Link.Redacted do def expand(_uri, %{torrent: id}, _opts) do end - end |