Merge pull request #13131 from annando/supportsprobe

Replace "Probe::isProbable" with "Protocol::supportsProbe"
This commit is contained in:
Hypolite Petovan 2023-05-17 15:44:21 -04:00 committed by GitHub
commit 878f144bc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

View file

@ -315,7 +315,12 @@ class Protocol
*/
public static function supportsProbe($protocol): bool
{
if (in_array($protocol, self::NATIVE_SUPPORT)) {
// "Mail" can only be probed for a specific user in a specific condition, so we are ignoring it here.
if ($protocol == self::MAIL) {
return false;
}
if (in_array($protocol, array_merge(self::NATIVE_SUPPORT, [self::ZOT, self::PHANTOM]))) {
return true;
}