The instrument is now added, updating AP contacts is now enabled
This commit is contained in:
parent
f60468677e
commit
aab4fa0c31
|
@ -133,7 +133,7 @@ function crepair_content(App $a)
|
||||||
$remote_self_options = ['0' => L10n::t('No mirroring'), '2' => L10n::t('Mirror as my own posting')];
|
$remote_self_options = ['0' => L10n::t('No mirroring'), '2' => L10n::t('Mirror as my own posting')];
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_profile = in_array($contact['network'], [Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS]);
|
$update_profile = in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS]);
|
||||||
|
|
||||||
$tab_str = contacts_tab($a, $contact, 5);
|
$tab_str = contacts_tab($a, $contact, 5);
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
namespace Friendica\Protocol\ActivityPub;
|
namespace Friendica\Protocol\ActivityPub;
|
||||||
|
|
||||||
|
use Friendica\BaseObject;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Util\HTTPSignature;
|
use Friendica\Util\HTTPSignature;
|
||||||
|
@ -552,6 +553,8 @@ class Transmitter
|
||||||
|
|
||||||
$data['published'] = DateTimeFormat::utc($item['created'] . '+00:00', DateTimeFormat::ATOM);
|
$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));
|
$data = array_merge($data, self::createPermissionBlockForItem($item));
|
||||||
|
|
||||||
if (in_array($data['type'], ['Create', 'Update', 'Delete'])) {
|
if (in_array($data['type'], ['Create', 'Update', 'Delete'])) {
|
||||||
|
@ -883,7 +886,7 @@ class Transmitter
|
||||||
'actor' => $owner['url'],
|
'actor' => $owner['url'],
|
||||||
'object' => $suggestion['url'],
|
'object' => $suggestion['url'],
|
||||||
'content' => $suggestion['note'],
|
'content' => $suggestion['note'],
|
||||||
'published' => DateTimeFormat::utc($suggestion['created'] . '+00:00', DateTimeFormat::ATOM),
|
'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
|
||||||
'to' => [ActivityPub::PUBLIC_COLLECTION],
|
'to' => [ActivityPub::PUBLIC_COLLECTION],
|
||||||
'cc' => []];
|
'cc' => []];
|
||||||
|
|
||||||
|
@ -910,6 +913,7 @@ class Transmitter
|
||||||
'actor' => $owner['url'],
|
'actor' => $owner['url'],
|
||||||
'object' => $owner['url'],
|
'object' => $owner['url'],
|
||||||
'published' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
|
'published' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
|
||||||
|
'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
|
||||||
'to' => [ActivityPub::PUBLIC_COLLECTION],
|
'to' => [ActivityPub::PUBLIC_COLLECTION],
|
||||||
'cc' => []];
|
'cc' => []];
|
||||||
|
|
||||||
|
@ -936,6 +940,7 @@ class Transmitter
|
||||||
'actor' => $owner['url'],
|
'actor' => $owner['url'],
|
||||||
'object' => self::getProfile($uid),
|
'object' => self::getProfile($uid),
|
||||||
'published' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
|
'published' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
|
||||||
|
'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
|
||||||
'to' => [$profile['followers']],
|
'to' => [$profile['followers']],
|
||||||
'cc' => []];
|
'cc' => []];
|
||||||
|
|
||||||
|
@ -963,6 +968,7 @@ class Transmitter
|
||||||
'type' => $activity,
|
'type' => $activity,
|
||||||
'actor' => $owner['url'],
|
'actor' => $owner['url'],
|
||||||
'object' => $profile['url'],
|
'object' => $profile['url'],
|
||||||
|
'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
|
||||||
'to' => $profile['url']];
|
'to' => $profile['url']];
|
||||||
|
|
||||||
logger('Sending activity ' . $activity . ' to ' . $target . ' for user ' . $uid, LOGGER_DEBUG);
|
logger('Sending activity ' . $activity . ' to ' . $target . ' for user ' . $uid, LOGGER_DEBUG);
|
||||||
|
@ -990,6 +996,7 @@ class Transmitter
|
||||||
'object' => ['id' => $id, 'type' => 'Follow',
|
'object' => ['id' => $id, 'type' => 'Follow',
|
||||||
'actor' => $profile['url'],
|
'actor' => $profile['url'],
|
||||||
'object' => $owner['url']],
|
'object' => $owner['url']],
|
||||||
|
'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
|
||||||
'to' => $profile['url']];
|
'to' => $profile['url']];
|
||||||
|
|
||||||
logger('Sending accept to ' . $target . ' for user ' . $uid . ' with id ' . $id, LOGGER_DEBUG);
|
logger('Sending accept to ' . $target . ' for user ' . $uid . ' with id ' . $id, LOGGER_DEBUG);
|
||||||
|
@ -1017,6 +1024,7 @@ class Transmitter
|
||||||
'object' => ['id' => $id, 'type' => 'Follow',
|
'object' => ['id' => $id, 'type' => 'Follow',
|
||||||
'actor' => $profile['url'],
|
'actor' => $profile['url'],
|
||||||
'object' => $owner['url']],
|
'object' => $owner['url']],
|
||||||
|
'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
|
||||||
'to' => $profile['url']];
|
'to' => $profile['url']];
|
||||||
|
|
||||||
logger('Sending reject to ' . $target . ' for user ' . $uid . ' with id ' . $id, LOGGER_DEBUG);
|
logger('Sending reject to ' . $target . ' for user ' . $uid . ' with id ' . $id, LOGGER_DEBUG);
|
||||||
|
@ -1045,6 +1053,7 @@ class Transmitter
|
||||||
'object' => ['id' => $id, 'type' => 'Follow',
|
'object' => ['id' => $id, 'type' => 'Follow',
|
||||||
'actor' => $owner['url'],
|
'actor' => $owner['url'],
|
||||||
'object' => $profile['url']],
|
'object' => $profile['url']],
|
||||||
|
'instrument' => ['type' => 'Service', 'name' => BaseObject::getApp()->getUserAgent()],
|
||||||
'to' => $profile['url']];
|
'to' => $profile['url']];
|
||||||
|
|
||||||
logger('Sending undo to ' . $target . ' for user ' . $uid . ' with id ' . $id, LOGGER_DEBUG);
|
logger('Sending undo to ' . $target . ' for user ' . $uid . ' with id ' . $id, LOGGER_DEBUG);
|
||||||
|
|
Loading…
Reference in a new issue