X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Foauth.ex;h=2f1b8708d54af29210c1b2fd1d8578058531181a;hb=ae3b0b4c0d67753696f46c5a01ecdecb10104a4e;hp=8c78d110031f21d3b9907a55092dc3116fa2c8e1;hpb=027adbc9e5c60cd43b8857eb7a3124e6df1310c2;p=akkoma
diff --git a/lib/pleroma/web/oauth.ex b/lib/pleroma/web/oauth.ex
index 8c78d1100..2f1b8708d 100644
--- a/lib/pleroma/web/oauth.ex
+++ b/lib/pleroma/web/oauth.ex
@@ -1,23 +1,6 @@
# 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.Web.OAuth do
- def parse_scopes(scopes, default) when is_list(scopes) do
- scopes = Enum.filter(scopes, &(&1 not in [nil, ""]))
-
- if Enum.any?(scopes),
- do: scopes,
- else: default
- end
-
- def parse_scopes(scopes, default) when is_binary(scopes) do
- scopes
- |> String.split(~r/[\s,]+/)
- |> parse_scopes(default)
- end
-
- def parse_scopes(_, default) do
- default
- end
end