diff options
author | Roman Chvanikov <chvanikoff@gmail.com> | 2019-04-20 19:43:06 +0700 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@gmail.com> | 2019-04-20 19:43:06 +0700 |
commit | 60f213bb1a6b1627cd8f6bf2903a42c3f3827f1a (patch) | |
tree | 297f8ad25104db162b4431f887bb23b3e22255e2 /lib/pleroma/web/common_api/common_api.ex | |
parent | 05cdb2f2389376081973d96b32e876d2a032d1f1 (diff) | |
parent | 6ca82c18a738205483dbbef2fd4de662d70227fb (diff) | |
download | pleroma-60f213bb1a6b1627cd8f6bf2903a42c3f3827f1a.tar.gz |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/digest-email
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r-- | lib/pleroma/web/common_api/common_api.ex | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index 74babdf14..6458a3449 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -125,7 +125,10 @@ defmodule Pleroma.Web.CommonAPI do "public" in_reply_to -> - Pleroma.Web.MastodonAPI.StatusView.get_visibility(in_reply_to.data["object"]) + # XXX: these heuristics should be moved out of MastodonAPI. + with %Object{} = object <- Object.normalize(in_reply_to) do + Pleroma.Web.MastodonAPI.StatusView.get_visibility(object) + end end end @@ -214,8 +217,10 @@ defmodule Pleroma.Web.CommonAPI do with %Activity{ actor: ^user_ap_id, data: %{ - "type" => "Create", - "object" => %{ + "type" => "Create" + }, + object: %Object{ + data: %{ "to" => object_to, "type" => "Note" } |