*
* Digest: https://tools.ietf.org/html/rfc5843
* https://tools.ietf.org/html/draft-cavage-http-signatures-10#ref-15
+ * https://github.com/digitalbazaar/php-json-ld
*
* Part of the code for HTTP signing is taken from the Osada project.
* https://framagit.org/macgirvin/osada
{
$item = Item::selectFirst([], ['id' => $item_id]);
+ if (!DBA::isResult($item)) {
+ return false;
+ }
+
+ $condition = ['item-uri' => $item['uri'], 'protocol' => Conversation::PARCEL_ACTIVITYPUB];
+ $conversation = DBA::selectFirst('conversation', ['source'], $condition);
+ if (DBA::isResult($conversation)) {
+ $data = json_decode($conversation['source']);
+ if (!empty($data)) {
+ return $data;
+ }
+ }
+
$data = ['@context' => ['https://www.w3.org/ns/activitystreams', 'https://w3id.org/security/v1',
['Emoji' => 'toot:Emoji', 'Hashtag' => 'as:Hashtag', 'atomUri' => 'ostatus:atomUri',
'conversation' => 'ostatus:conversation', 'inReplyToAtomUri' => 'ostatus:inReplyToAtomUri',
$tag_text .= ',';
}
+ if (empty($tag['href'])) {
+ //$tag['href']
+ logger('Blubb!');
+ }
+
$tag_text .= substr($tag['name'], 0, 1) . '[url=' . $tag['href'] . ']' . substr($tag['name'], 1) . '[/url]';
}
}