*/
namespace Friendica\Protocol\ActivityPub;
+use Friendica\BaseObject;
use Friendica\Database\DBA;
use Friendica\Core\System;
use Friendica\Util\HTTPSignature;
$data['published'] = DateTimeFormat::utc($item['created'] . '+00:00', DateTimeFormat::ATOM);
+ $data['instrument'] = ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()];
+
$data = array_merge($data, self::createPermissionBlockForItem($item));
if (in_array($data['type'], ['Create', 'Update', 'Delete'])) {
'actor' => $owner['url'],
'object' => $suggestion['url'],
'content' => $suggestion['note'],
- 'published' => DateTimeFormat::utc($suggestion['created'] . '+00:00', DateTimeFormat::ATOM),
+ 'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
'to' => [ActivityPub::PUBLIC_COLLECTION],
'cc' => []];
'actor' => $owner['url'],
'object' => $owner['url'],
'published' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
+ 'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
'to' => [ActivityPub::PUBLIC_COLLECTION],
'cc' => []];
'actor' => $owner['url'],
'object' => self::getProfile($uid),
'published' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
+ 'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
'to' => [$profile['followers']],
'cc' => []];
'type' => $activity,
'actor' => $owner['url'],
'object' => $profile['url'],
+ 'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
'to' => $profile['url']];
logger('Sending activity ' . $activity . ' to ' . $target . ' for user ' . $uid, LOGGER_DEBUG);
'object' => ['id' => $id, 'type' => 'Follow',
'actor' => $profile['url'],
'object' => $owner['url']],
+ 'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
'to' => $profile['url']];
logger('Sending accept to ' . $target . ' for user ' . $uid . ' with id ' . $id, LOGGER_DEBUG);
'object' => ['id' => $id, 'type' => 'Follow',
'actor' => $profile['url'],
'object' => $owner['url']],
+ 'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
'to' => $profile['url']];
logger('Sending reject to ' . $target . ' for user ' . $uid . ' with id ' . $id, LOGGER_DEBUG);
'object' => ['id' => $id, 'type' => 'Follow',
'actor' => $owner['url'],
'object' => $profile['url']],
+ 'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
'to' => $profile['url']];
logger('Sending undo to ' . $target . ' for user ' . $uid . ' with id ' . $id, LOGGER_DEBUG);