diff options
author | lain <lain@soykaf.club> | 2018-02-20 19:50:34 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2018-02-20 19:50:34 +0100 |
commit | fd95075e328048ccc48d451a367820ac40e9ccd2 (patch) | |
tree | 6d637c71e96b220a6de1487083cc6ec420abf064 | |
parent | 95f7e7e2d5d70e8fc28cd5d8819460a1c6f95821 (diff) | |
download | pleroma-fd95075e328048ccc48d451a367820ac40e9ccd2.tar.gz |
TwitterAPI: Fix mentions.
-rw-r--r-- | lib/pleroma/web/twitter_api/representers/activity_representer.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex index 98be18c98..b0dfeaf39 100644 --- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex +++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex @@ -126,7 +126,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do mentions = opts[:mentioned] || [] - attentions = activity.data["to"] + attentions = activity.recipients |> Enum.map(fn (ap_id) -> Enum.find(mentions, fn(user) -> ap_id == user.ap_id end) end) |> Enum.filter(&(&1)) |> Enum.map(fn (user) -> UserView.render("show.json", %{user: user, for: opts[:for]}) end) |