aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/api.php')
-rw-r--r--include/api.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/api.php b/include/api.php
index 62dc78506..0d446d1a7 100644
--- a/include/api.php
+++ b/include/api.php
@@ -401,8 +401,16 @@
// convert $_POST array items to the form we use for web posts.
+ // logger('api_post: ' . print_r($_POST,true));
+
$_POST['body'] = urldecode(requestdata('status'));
- $_POST['parent'] = requestdata('in_reply_to_status_id');
+
+ $parent = requestdata('in_reply_to_status_id');
+ if(ctype_digit($parent))
+ $_POST['parent'] = $parent;
+ else
+ $_POST['parent_uri'] = $parent;
+
if(requestdata('lat') && requestdata('long'))
$_POST['coord'] = sprintf("%s %s",requestdata('lat'),requestdata('long'));
$_POST['profile_uid'] = local_user();