New constant for federated protocols

This commit is contained in:
Michael 2019-07-01 18:00:55 +00:00
commit 6041f74df6
14 changed files with 29 additions and 27 deletions

View file

@ -132,7 +132,7 @@ function crepair_content(App $a)
$remote_self_options = ['0' => L10n::t('No mirroring'), '2' => L10n::t('Mirror as my own posting')];
}
$update_profile = in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS]);
$update_profile = in_array($contact['network'], Protocol::FEDERATED);
$tab_str = Module\Contact::getTabsHTML($a, $contact, 5);

View file

@ -163,7 +163,7 @@ function item_post(App $a) {
}
// Allow commenting if it is an answer to a public post
$allow_comment = local_user() && ($profile_uid == 0) && $toplevel_item_id && in_array($toplevel_item['network'], [Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA, Protocol::DFRN]);
$allow_comment = local_user() && ($profile_uid == 0) && $toplevel_item_id && in_array($toplevel_item['network'], Protocol::FEDERATED);
// Now check that valid personal details have been provided
if (!Security::canWriteToUserWall($profile_uid) && !$allow_comment) {