X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Foauth.ex;h=280cf28c03fb948478610d86b3cfd1f764aa7633;hb=3508f698b9b51a86ccc5014f83f9b6c89ba58b0d;hp=8c78d110031f21d3b9907a55092dc3116fa2c8e1;hpb=027adbc9e5c60cd43b8857eb7a3124e6df1310c2;p=akkoma diff --git a/lib/pleroma/web/oauth.ex b/lib/pleroma/web/oauth.ex index 8c78d1100..280cf28c0 100644 --- a/lib/pleroma/web/oauth.ex +++ b/lib/pleroma/web/oauth.ex @@ -3,21 +3,4 @@ # 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