Merge pull request #2405 from annando/1603-ostatus4-bugfix
Bugfix: A parameter was missing for the OStatus author check
This commit is contained in:
commit
a28d44a9ba
|
@ -719,10 +719,11 @@ function ostatus_fetch_conversation($self, $conversation_id = "") {
|
||||||
*
|
*
|
||||||
* @param string $actor The actor url
|
* @param string $actor The actor url
|
||||||
* @param int $uid The user id
|
* @param int $uid The user id
|
||||||
|
* @param int $contact_id The default contact-id
|
||||||
*
|
*
|
||||||
* @return array Array with actor details
|
* @return array Array with actor details
|
||||||
*/
|
*/
|
||||||
function ostatus_get_actor_details($actor, $uid) {
|
function ostatus_get_actor_details($actor, $uid, $contact_id) {
|
||||||
|
|
||||||
$details = array();
|
$details = array();
|
||||||
|
|
||||||
|
@ -748,7 +749,7 @@ function ostatus_get_actor_details($actor, $uid) {
|
||||||
|
|
||||||
logger("Global contact ".$global_contact_id." found for url ".$actor, LOGGER_DEBUG);
|
logger("Global contact ".$global_contact_id." found for url ".$actor, LOGGER_DEBUG);
|
||||||
|
|
||||||
$details["contact_id"] = $parent["contact-id"];
|
$details["contact_id"] = $contact_id;
|
||||||
$details["network"] = NETWORK_OSTATUS;
|
$details["network"] = NETWORK_OSTATUS;
|
||||||
|
|
||||||
$details["not_following"] = true;
|
$details["not_following"] = true;
|
||||||
|
@ -997,7 +998,7 @@ function ostatus_completion($conversation_url, $uid, $item = array(), $self = ""
|
||||||
if (isset($single_conv->actor->url))
|
if (isset($single_conv->actor->url))
|
||||||
$actor = $single_conv->actor->url;
|
$actor = $single_conv->actor->url;
|
||||||
|
|
||||||
$details = ostatus_get_actor_details($actor, $uid);
|
$details = ostatus_get_actor_details($actor, $uid, $parent["contact-id"]);
|
||||||
|
|
||||||
// Do we only want to import threads that were started by our contacts?
|
// Do we only want to import threads that were started by our contacts?
|
||||||
if ($details["not_following"] AND $new_parent AND get_config('system','ostatus_full_threads')) {
|
if ($details["not_following"] AND $new_parent AND get_config('system','ostatus_full_threads')) {
|
||||||
|
@ -1138,7 +1139,7 @@ function ostatus_completion($conversation_url, $uid, $item = array(), $self = ""
|
||||||
//$arr["app"] .= " (OStatus-NoConvFound)";
|
//$arr["app"] .= " (OStatus-NoConvFound)";
|
||||||
|
|
||||||
if (get_config('system','ostatus_full_threads')) {
|
if (get_config('system','ostatus_full_threads')) {
|
||||||
$details = ostatus_get_actor_details($item["owner-link"], $uid);
|
$details = ostatus_get_actor_details($item["owner-link"], $uid, $item["contact-id"]);
|
||||||
if ($details["not_following"]) {
|
if ($details["not_following"]) {
|
||||||
logger("Don't import uri ".$item["uri"]." because user ".$uid." doesn't follow the person ".$item["owner-link"], LOGGER_DEBUG);
|
logger("Don't import uri ".$item["uri"]." because user ".$uid." doesn't follow the person ".$item["owner-link"], LOGGER_DEBUG);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue