projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/develop' into feature/embeddable-posts
[akkoma]
/
lib
/
pleroma
/
web
/
twitter_api
/
controllers
/
util_controller.ex
diff --git
a/lib/pleroma/web/twitter_api/controllers/util_controller.ex
b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
index 824951d599d07d7c0d3286e9f1d83472b3b09cd4..fd2aee17569c241ca4d715349f27e0a65a8ad40c 100644
(file)
--- a/
lib/pleroma/web/twitter_api/controllers/util_controller.ex
+++ b/
lib/pleroma/web/twitter_api/controllers/util_controller.ex
@@
-25,13
+25,6
@@
defmodule Pleroma.Web.TwitterAPI.UtilController do
when action == :follow_import
)
when action == :follow_import
)
- # Note: follower can submit the form (with password auth) not being signed in (having no token)
- plug(
- OAuthScopesPlug,
- %{fallback: :proceed_unauthenticated, scopes: ["follow", "write:follows"]}
- when action == :do_remote_follow
- )
-
plug(OAuthScopesPlug, %{scopes: ["follow", "write:blocks"]} when action == :blocks_import)
plug(
plug(OAuthScopesPlug, %{scopes: ["follow", "write:blocks"]} when action == :blocks_import)
plug(
@@
-216,7
+209,8
@@
defmodule Pleroma.Web.TwitterAPI.UtilController do
end
def blocks_import(%{assigns: %{user: blocker}} = conn, %{"list" => list}) do
end
def blocks_import(%{assigns: %{user: blocker}} = conn, %{"list" => list}) do
- User.blocks_import(blocker, _blocked_identifiers = String.split(list))
+ blocked_identifiers = list |> String.split() |> Enum.map(&String.trim_leading(&1, "@"))
+ User.blocks_import(blocker, blocked_identifiers)
json(conn, "job started")
end
json(conn, "job started")
end