<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
const STATUSNET = 'stac'; // Statusnet connector
const TWITTER = 'twit'; // Twitter
const DISCOURSE = 'dscs'; // Discourse
+ const TUMBLR = 'tmbl'; // Tumblr
+ const BLUESKY = 'bsky'; // Bluesky
// Dead protocols
const APPNET = 'apdn'; // app.net - Dead protocol
return $hook_data['result'];
}
+
+ /**
+ * 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;
+ }
}