]> git.mxchange.org Git - friendica.git/commitdiff
API: Path to post added / "external_url" support
authorMichael <heluecht@pirati.ca>
Sun, 17 Dec 2017 15:16:18 +0000 (15:16 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 17 Dec 2017 15:16:18 +0000 (15:16 +0000)
include/api.php

index cf7767757c5e4c849e8d5e71115e2dce177fac6c..9d360fc7758bccfc22ea8f2e56442119032d44ce 100644 (file)
@@ -1324,8 +1324,9 @@ function api_status_show($type)
                        'retweeted' => false,
                        'possibly_sensitive' => false,
                        'lang' => "",
-                       'statusnet_html'                => $converted["html"],
-                       'statusnet_conversation_id'     => $lastwall['parent'],
+                       'statusnet_html' => $converted["html"],
+                       'statusnet_conversation_id' => $lastwall['parent'],
+                       'external_url' => System::baseUrl() . "/display/" . $lastwall['guid'],
                );
 
                if (count($converted["attachments"]) > 0) {
@@ -1413,7 +1414,8 @@ function api_users_show($type)
                        $geo => null,
                        'favorited' => $lastwall['starred'] ? true : false,
                        'statusnet_html' => $converted["html"],
-                       'statusnet_conversation_id'     => $lastwall['parent'],
+                       'statusnet_conversation_id' => $lastwall['parent'],
+                       'external_url' => System::baseUrl() . "/display/" . $lastwall['guid'],
                );
 
                if (count($converted["attachments"]) > 0) {
@@ -2779,8 +2781,9 @@ function api_format_items($r, $user_info, $filter_user = false, $type = "json")
                        'user' =>  $status_user ,
                        'friendica_owner' => $owner_user,
                        //'entities' => NULL,
-                       'statusnet_html'                => $converted["html"],
-                       'statusnet_conversation_id'     => $item['parent'],
+                       'statusnet_html' => $converted["html"],
+                       'statusnet_conversation_id' => $item['parent'],
+                       'external_url' => System::baseUrl() . "/display/" . $item['guid'],
                        'friendica_activities' => api_format_items_activities($item, $type),
                );