Commit fd95075e authored by lain's avatar lain
Browse files

TwitterAPI: Fix mentions.

parent 95f7e7e2
Pipeline #768 failed with stage
in 2 minutes and 43 seconds
......@@ -126,7 +126,7 @@ def to_map(%Activity{data: %{"object" => %{"content" => content} = object}} = ac
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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment