From fd95075e328048ccc48d451a367820ac40e9ccd2 Mon Sep 17 00:00:00 2001
From: lain <lain@soykaf.club>
Date: Tue, 20 Feb 2018 19:50:34 +0100
Subject: [PATCH] TwitterAPI: Fix mentions.

---
 .../web/twitter_api/representers/activity_representer.ex        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)