aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-31 17:52:36 -0700
committerFriendika <info@friendika.com>2011-07-31 17:52:36 -0700
commitb0a9ec0a73183e48158a4e42db49943c56db9098 (patch)
treec15f2723a0c73365514710922b1267fc6acbe90a /include
parent0c9f033505be5dbc2303d8758894e57c616c6534 (diff)
downloadvolse-hubzilla-b0a9ec0a73183e48158a4e42db49943c56db9098.tar.gz
volse-hubzilla-b0a9ec0a73183e48158a4e42db49943c56db9098.tar.bz2
volse-hubzilla-b0a9ec0a73183e48158a4e42db49943c56db9098.zip
better handling of api comments/replies
Diffstat (limited to 'include')
-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();