mirror of
https://github.com/friendica/friendica
synced 2024-11-10 02:22:55 +00:00
save plink for diaspora items so likes will point to right post
This commit is contained in:
parent
3cd8ee7161
commit
0cfc8570d2
1 changed files with 23 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue