aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSachin Joshi <satchin.joshi@gmail.com>2019-04-02 10:26:09 +0545
committerSachin Joshi <satchin.joshi@gmail.com>2019-04-02 10:26:09 +0545
commit6386c1c9c1ff971c784744922a479ae38e5fdbad (patch)
tree03db21b0991906a6b334b9e88217da8bb2d71400 /lib
parent1d01e8e656c364b97b9ee36a6173a830d3f5f4fc (diff)
downloadpleroma-6386c1c9c1ff971c784744922a479ae38e5fdbad.tar.gz
fetch url for OStatus to know if it is a/c or status
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/twitter_api/controllers/util_controller.ex6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
index 7f301a518..2a1c73111 100644
--- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex
+++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
@@ -103,8 +103,10 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
end
defp is_status?(acct) do
- %URI{path: path} = URI.parse(acct)
- Regex.match?(~r/\/users\/[^\/]+\/statuses\/([0-9]+)$/, path)
+ case ActivityPub.fetch_and_contain_remote_object_from_id(acct) do
+ {:ok, %{"type" => "Note"}} -> true
+ _ -> false
+ end
end
def do_remote_follow(conn, %{