Fix external url in twitterapi.
authorlain <lain@soykaf.club>
Sat, 24 Feb 2018 19:29:57 +0000 (20:29 +0100)
committerlain <lain@soykaf.club>
Sat, 24 Feb 2018 19:29:57 +0000 (20:29 +0100)
lib/pleroma/web/twitter_api/representers/activity_representer.ex

index b0dfeaf39066c69b588e90d22162813b7f08082e..8970b7c68c8a9272b3ef8a895af10280ff15f0c5 100644 (file)
@@ -164,7 +164,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
       "repeat_num" => announcement_count,
       "favorited" => to_boolean(favorited),
       "repeated" => to_boolean(repeated),
-      "external_url" => object["external_url"],
+      "external_url" => object["external_url"] || object["id"],
       "tags" => tags,
       "activity_type" => "post",
       "possibly_sensitive" => possibly_sensitive