Merge pull request #4882 from annando/private-forums

Contact requests from Diaspora for private forums aren't accepted automatically anymore
This commit is contained in:
Tobias Diekershoff 2018-04-21 13:54:10 +02:00 committed by GitHub
commit ebe203336f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1173,7 +1173,7 @@ class Diaspora
// Yes, then it is fine. // Yes, then it is fine.
return true; return true;
// Is it a post to a community? // Is it a post to a community?
} elseif (($contact["rel"] == CONTACT_IS_FOLLOWER) && ($importer["page-flags"] == PAGE_COMMUNITY)) { } elseif (($contact["rel"] == CONTACT_IS_FOLLOWER) && in_array($importer["page-flags"], [PAGE_COMMUNITY, PAGE_PRVGROUP])) {
// That's good // That's good
return true; return true;
// Is the message a global user or a comment? // Is the message a global user or a comment?
@ -2665,7 +2665,7 @@ class Diaspora
Contact::updateAvatar($ret["photo"], $importer['uid'], $contact_record["id"], true); Contact::updateAvatar($ret["photo"], $importer['uid'], $contact_record["id"], true);
if ($importer["page-flags"] == PAGE_NORMAL) { if (in_array($importer["page-flags"], [PAGE_NORMAL, PAGE_PRVGROUP])) {
logger("Sending intra message for author ".$author.".", LOGGER_DEBUG); logger("Sending intra message for author ".$author.".", LOGGER_DEBUG);
$hash = random_string().(string)time(); // Generate a confirm_key $hash = random_string().(string)time(); // Generate a confirm_key