mirror of
https://github.com/friendica/friendica
synced 2024-12-22 06:07:27 +01:00
still need the original author information for comments and likes
This commit is contained in:
parent
09eb52810b
commit
0946c4a375
1 changed files with 24 additions and 0 deletions
|
@ -1119,6 +1119,18 @@ function diaspora_comment($importer,$xml,$msg) {
|
|||
|
||||
// Phew! Everything checks out. Now create an item.
|
||||
|
||||
// Find the original comment author information
|
||||
if(strcasecmp($diaspora_handle,$msg['author']) == 0)
|
||||
$person = $contact;
|
||||
else {
|
||||
$person = find_diaspora_person_by_handle($diaspora_handle);
|
||||
|
||||
if(! is_array($person)) {
|
||||
logger('diaspora_comment: unable to find author details');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$body = diaspora2bb($text);
|
||||
|
||||
$message_id = $diaspora_handle . ':' . $guid;
|
||||
|
@ -1704,6 +1716,18 @@ function diaspora_like($importer,$xml,$msg) {
|
|||
|
||||
// Phew! Everything checks out. Now create an item.
|
||||
|
||||
// Find the original like author information
|
||||
if(strcasecmp($diaspora_handle,$msg['author']) == 0)
|
||||
$person = $contact;
|
||||
else {
|
||||
$person = find_diaspora_person_by_handle($diaspora_handle);
|
||||
|
||||
if(! is_array($person)) {
|
||||
logger('diaspora_like: unable to find author details');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$uri = $diaspora_handle . ':' . $guid;
|
||||
|
||||
$activity = ACTIVITY_LIKE;
|
||||
|
|
Loading…
Reference in a new issue