Posts from Diaspora are always accepted for the global contact

This commit is contained in:
Michael Vogel 2015-08-09 14:28:59 +02:00
parent 8974c147e0
commit 65921bf2e7

View file

@ -34,8 +34,13 @@ function diaspora_dispatch_public($msg) {
diaspora_dispatch($rr,$msg); diaspora_dispatch($rr,$msg);
} }
} }
else else {
logger('diaspora_public: no subscribers'); logger('diaspora_public: no subscribers '.print_r($msg, true));
// Use a dummy importer
$importer = array("uid" => 0, "page-flags" => PAGE_FREELOVE);
diaspora_dispatch($importer,$msg);
}
} }
@ -782,6 +787,11 @@ function diaspora_post_allow($importer,$contact) {
if($contact['rel'] == CONTACT_IS_FOLLOWER) if($contact['rel'] == CONTACT_IS_FOLLOWER)
if($importer['page-flags'] == PAGE_COMMUNITY) if($importer['page-flags'] == PAGE_COMMUNITY)
return true; return true;
// Messages for the global users are always accepted
if ($importer['uid'] == 0)
return true;
return false; return false;
} }