mirror of
https://github.com/friendica/friendica
synced 2025-04-22 11:50:11 +00:00
Block communication with Diaspora for communities
This commit is contained in:
parent
2b0518ac04
commit
29d83c0ffb
4 changed files with 17 additions and 7 deletions
|
@ -818,6 +818,15 @@ class Item
|
|||
$item['inform'] = trim($item['inform'] ?? '');
|
||||
$item['file'] = trim($item['file'] ?? '');
|
||||
|
||||
// Communities aren't working with the Diaspora protoccol
|
||||
if (($uid != 0) && ($item['network'] == Protocol::DIASPORA)) {
|
||||
$user = User::getById($uid, ['account-type']);
|
||||
if ($user['account-type'] == Contact::TYPE_COMMUNITY) {
|
||||
Logger::info('Community posts are not supported via Diaspora');
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Items cannot be stored before they happen ...
|
||||
if ($item['created'] > DateTimeFormat::utcNow()) {
|
||||
$item['created'] = DateTimeFormat::utcNow();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue