retweeted_xml = to_simple_form(retweeted_activity, retweeted_user, true)
- mentions = activity.recipients |> get_mentions
+ mentions =
+ ([retweeted_user.ap_id] ++ activity.recipients)
+ |> Enum.uniq()
+ |> get_mentions()
[
{:"activity:object-type", ['http://activitystrea.ms/schema/1.0/activity']},
author = if with_author, do: [{:author, UserRepresenter.to_simple_form(user)}], else: []
mentions = (activity.recipients || []) |> get_mentions
- follow_activity = Activity.get_by_ap_id(follow_activity["id"])
+ follow_activity = Activity.normalize(follow_activity)
+
[
{:"activity:object-type", ['http://activitystrea.ms/schema/1.0/activity']},
{:"activity:verb", ['http://activitystrea.ms/schema/1.0/unfollow']},