aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/diaspora.php')
-rw-r--r--include/diaspora.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 0ab467829..89afc46f9 100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -457,7 +457,14 @@ function diaspora_post($importer,$xml) {
$datarray['body'] = $body;
$datarray['app'] = 'Diaspora';
- item_store($datarray);
+ $message_id = item_store($datarray);
+
+ if($message_id) {
+ q("update item set plink = '%s' where id = %d limit 1",
+ dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
+ intval($message_id)
+ );
+ }
return;
@@ -576,6 +583,13 @@ function diaspora_comment($importer,$xml,$msg) {
$message_id = item_store($datarray);
+ if($message_id) {
+ q("update item set plink = '%s' where id = %d limit 1",
+ dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
+ intval($message_id)
+ );
+ }
+
if(! $parent_author_signature) {
q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
intval($message_id),
@@ -805,6 +819,14 @@ EOT;
$message_id = item_store($arr);
+
+ if($message_id) {
+ q("update item set plink = '%s' where id = %d limit 1",
+ dbesc($a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id),
+ intval($message_id)
+ );
+ }
+
if(! $parent_author_signature) {
q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
intval($message_id),