mirror of
https://github.com/friendica/friendica
synced 2024-12-23 14:40:16 +00:00
Reshared posts weren't always recognized as such.
This commit is contained in:
parent
7c0c56d20b
commit
796b13673d
1 changed files with 20 additions and 0 deletions
|
@ -2512,6 +2512,26 @@ function diaspora_is_reshare($body) {
|
||||||
if ($body == $attributes)
|
if ($body == $attributes)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
|
$guid = "";
|
||||||
|
preg_match("/guid='(.*?)'/ism", $attributes, $matches);
|
||||||
|
if ($matches[1] != "")
|
||||||
|
$guid = $matches[1];
|
||||||
|
|
||||||
|
preg_match('/guid="(.*?)"/ism', $attributes, $matches);
|
||||||
|
if ($matches[1] != "")
|
||||||
|
$guid = $matches[1];
|
||||||
|
|
||||||
|
if ($guid != "") {
|
||||||
|
$r = q("SELECT `contact-id` FROM `item` WHERE `guid` = '%s' AND `network` IN ('%s', '%s') LIMIT 1",
|
||||||
|
dbesc($guid), NETWORK_DFRN, NETWORK_DIASPORA);
|
||||||
|
if ($r) {
|
||||||
|
$ret= array();
|
||||||
|
$ret["root_handle"] = diaspora_handle_from_contact($r[0]["contact-id"]);
|
||||||
|
$ret["root_guid"] = $guid;
|
||||||
|
return($ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$profile = "";
|
$profile = "";
|
||||||
preg_match("/profile='(.*?)'/ism", $attributes, $matches);
|
preg_match("/profile='(.*?)'/ism", $attributes, $matches);
|
||||||
if ($matches[1] != "")
|
if ($matches[1] != "")
|
||||||
|
|
Loading…
Reference in a new issue