Block communication with Diaspora for communities

This commit is contained in:
Michael 2022-02-15 07:08:02 +00:00
parent 2b0518ac04
commit 29d83c0ffb
4 changed files with 17 additions and 7 deletions

View file

@ -93,6 +93,12 @@ class Receive extends BaseModule
$importer = User::getByGuid($this->parameters['guid']);
if ($importer['account-type'] == User::ACCOUNT_TYPE_COMMUNITY) {
// Communities aren't working with the Diaspora protoccol
// We throw an "accepted" here, so that the sender doesn't repeat the delivery
throw new HTTPException\AcceptedException();
}
$msg = $this->decodePost(false, $importer['prvkey'] ?? '');
$this->logger->info('Diaspora: Dispatching.');