New constant for federated protocols

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

View file

@ -23,6 +23,8 @@ class Protocol
const NATIVE_SUPPORT = [self::DFRN, self::DIASPORA, self::OSTATUS, self::FEED, self::MAIL, self::ACTIVITYPUB];
const FEDERATED = [self::DFRN, self::DIASPORA, self::OSTATUS, self::ACTIVITYPUB];
// Supported through a connector
const DIASPORA2 = 'dspc'; // Diaspora connector
const LINKEDIN = 'lnkd'; // LinkedIn

View file

@ -49,7 +49,7 @@ class Search extends BaseObject
return $emptyResultList;
}
if (!(in_array($user_data["network"], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::OSTATUS, Protocol::DIASPORA]))) {
if (!(in_array($user_data["network"], Protocol::FEDERATED))) {
return $emptyResultList;
}