diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-04-22 13:08:30 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-04-22 13:08:30 +0700 |
commit | e8c2f9a73a37636a9a8ed5c2998617b841f482da (patch) | |
tree | 4b194e631d2bbb58b8522c3d74a0b0c2ea09fedd /lib/pleroma/web/common_api/common_api.ex | |
parent | 38926a063a39c4d4387049f5d364f72a9f8bd2de (diff) | |
parent | 7fcbda702e76b6390076c28832f5aea80086d15a (diff) | |
download | pleroma-e8c2f9a73a37636a9a8ed5c2998617b841f482da.tar.gz |
Merge remote-tracking branch 'pleroma/develop' into feature/disable-account
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" } |