Merge remote-tracking branch 'pleroma/develop' into feature/disable-account
[akkoma] / lib / pleroma / web / controller_helper.ex
index 6fc5a3cb6ed54bc336d3e143ac6c8b689fd8424c..55706eeb84a7e843d4ab8c3bd73d8de56febeb12 100644 (file)
@@ -7,15 +7,9 @@ defmodule Pleroma.Web.ControllerHelper do
 
   # As in MastoAPI, per https://api.rubyonrails.org/classes/ActiveModel/Type/Boolean.html
   @falsy_param_values [false, 0, "0", "f", "F", "false", "FALSE", "off", "OFF"]
-  def truthy_param?(nil), do: nil
+  def truthy_param?(blank_value) when blank_value in [nil, ""], do: nil
   def truthy_param?(value), do: value not in @falsy_param_values
 
-  def oauth_scopes(params, default) do
-    # Note: `scopes` is used by Mastodon — supporting it but sticking to
-    # OAuth's standard `scope` wherever we control it
-    Pleroma.Web.OAuth.parse_scopes(params["scope"] || params["scopes"], default)
-  end
-
   def json_response(conn, status, json) do
     conn
     |> put_status(status)