namespace Friendica\Util;
use Friendica\Core\Config;
-use Friendica\Database\dba;
-use Friendica\Database\DBM;
+use Friendica\Database\DBA;
/**
* @brief Implements HTTP Signatures per draft-cavage-http-signatures-07.
$key = $key($sig_block['keyId']);
}
+ logger('Got keyID ' . $sig_block['keyId']);
+
// We don't use Activity Pub at the moment.
// if (!$key) {
// $result['signer'] = $sig_block['keyId'];
private static function getActivitypubKey($id)
{
if (strpos($id, 'acct:') === 0) {
- $contact = dba::selectFirst('contact', ['pubkey'], ['uid' => 0, 'addr' => str_replace('acct:', '', $id)]);
+ $contact = DBA::selectFirst('contact', ['pubkey'], ['uid' => 0, 'addr' => str_replace('acct:', '', $id)]);
} else {
- $contact = dba::selectFirst('contact', ['pubkey'], ['id' => $id, 'network' => 'activitypub']);
+ $contact = DBA::selectFirst('contact', ['pubkey'], ['id' => $id, 'network' => 'activitypub']);
}
- if (DBM::is_result($contact)) {
+ if (DBA::isResult($contact)) {
return $contact['pubkey'];
}