}
$data = ['@context' => ['https://www.w3.org/ns/activitystreams', 'https://w3id.org/security/v1',
- ['uuid' => 'http://schema.org/identifier', 'sensitive' => 'as:sensitive',
- 'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
- 'vcard' => 'http://www.w3.org/2006/vcard/ns#']]];
+ ['vcard' => 'http://www.w3.org/2006/vcard/ns#', 'uuid' => 'http://schema.org/identifier',
+ 'sensitive' => 'as:sensitive', 'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers']]];
$data['id'] = $contact['url'];
$data['uuid'] = $user['guid'];
}
}
} else {
- $data['to'][] = System::baseUrl() . '/followers/' . $item['author-nick'];
+ //$data['cc'][] = System::baseUrl() . '/followers/' . $item['author-nick'];
$receiver_list = Item::enumeratePermissions($item);
$mentioned = [];
if (empty($data['to'])) {
$data['to'] = $data['cc'];
- unset($data['cc']);
+ $data['cc'] = [];
}
}
$contact = DBA::selectFirst('contact', ['url'], ['id' => $cid, 'network' => Protocol::ACTIVITYPUB]);
$profile = Probe::uri($contact['url'], Protocol::ACTIVITYPUB);
if ($profile['network'] == Protocol::ACTIVITYPUB) {
- //$target = defaults($profile, 'batch', $profile['notify']);
- $target = $profile['notify'];
+ $target = defaults($profile, 'batch', $profile['notify']);
$inboxes[$target] = $target;
}
}
$contact = DBA::selectFirst('contact', ['url'], ['id' => $receiver, 'network' => Protocol::ACTIVITYPUB]);
$profile = Probe::uri($contact['url'], Protocol::ACTIVITYPUB);
if ($profile['network'] == Protocol::ACTIVITYPUB) {
- //$target = defaults($profile, 'batch', $profile['notify']);
- $target = $profile['notify'];
+ $target = defaults($profile, 'batch', $profile['notify']);
$inboxes[$target] = $target;
}
}
}
$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',
- 'ostatus' => 'http://ostatus.org#', 'sensitive' => 'as:sensitive',
- 'toot' => 'http://joinmastodon.org/ns#']]];
+ ['ostatus' => 'http://ostatus.org#', 'sensitive' => 'as:sensitive',
+ 'Hashtag' => 'as:Hashtag', 'atomUri' => 'ostatus:atomUri',
+ 'conversation' => 'ostatus:conversation',
+ 'inReplyToAtomUri' => 'ostatus:inReplyToAtomUri']]];
$data['type'] = 'Create';
$data['id'] = $item['uri'] . '#activity';
}
$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',
- 'ostatus' => 'http://ostatus.org#', 'sensitive' => 'as:sensitive',
- 'toot' => 'http://joinmastodon.org/ns#']]];
+ ['ostatus' => 'http://ostatus.org#', 'sensitive' => 'as:sensitive',
+ 'Hashtag' => 'as:Hashtag', 'atomUri' => 'ostatus:atomUri',
+ 'conversation' => 'ostatus:conversation',
+ 'inReplyToAtomUri' => 'ostatus:inReplyToAtomUri']]];
$data = array_merge($data, self::createNote($item));
{
$tags = [];
- $receiver_list = Item::enumeratePermissions($item);
- foreach ($receiver_list as $receiver) {
- $contact = DBA::selectFirst('contact', ['url', 'addr'], ['id' => $receiver, 'network' => Protocol::ACTIVITYPUB]);
- if (!empty($contact['addr'])) {
- $mention = '@' . $contact['addr'];
- } else {
- $mention = '@' . $term['url'];
- }
- $tags[] = ['type' => 'Mention', 'href' => $contact['url'], 'name' => $mention];
- }
-
$terms = Term::tagArrayFromItemId($item['id']);
foreach ($terms as $term) {
if ($term['type'] == TERM_MENTION) {
$data['source'] = ['content' => $item['body'], 'mediaType' => "text/bbcode"];
$data['summary'] = ''; // Ignore by now
$data['sensitive'] = false; // - Query NSFW
- $data['emoji'] = []; // Ignore by now
+ //$data['emoji'] = []; // Ignore by now
$data['tag'] = self::createTagList($item);
$data['attachment'] = []; // @ToDo
return $data;