+
+ /**
+ * Returns whether the provided protocol supports probing for contacts
+ *
+ * @param $protocol
+ * @return bool
+ * @throws HTTPException\InternalServerErrorException
+ */
+ public static function supportsProbe($protocol): bool
+ {
+ // "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;
+ }
+
+ $hook_data = [
+ 'protocol' => $protocol,
+ 'result' => null
+ ];
+ Hook::callAll('support_probe', $hook_data);
+
+ return $hook_data['result'] === true;
+ }