diff options
author | lain <lain@soykaf.club> | 2019-06-03 18:17:08 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-06-03 18:17:08 +0200 |
commit | 80d4d83aaccf49ddc2a594448851585bf80443bb (patch) | |
tree | 63d93cd58f9cb206ca5c71c1a09e2da46199e98f /lib/pleroma/web/common_api/common_api.ex | |
parent | 2b664b048eac5f37421ab958e26efed9c158c8d0 (diff) | |
download | pleroma-80d4d83aaccf49ddc2a594448851585bf80443bb.tar.gz |
CommonAPI: Add explicit addressing.
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r-- | lib/pleroma/web/common_api/common_api.ex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index 5212d5ce5..f5f62eee3 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -201,8 +201,10 @@ defmodule Pleroma.Web.CommonAPI do data, visibility ), + mentioned_users <- for({_, mentioned_user} <- mentions, do: mentioned_user.ap_id), + addressed_users <- get_addressed_users(mentioned_users, data["to"]), {poll, poll_emoji} <- make_poll_data(data), - {to, cc} <- to_for_user_and_mentions(user, mentions, in_reply_to, visibility), + {to, cc} <- get_to_and_cc(user, addressed_users, in_reply_to, visibility), context <- make_context(in_reply_to), cw <- data["spoiler_text"] || "", sensitive <- data["sensitive"] || Enum.member?(tags, {"#nsfw", "nsfw"}), |