mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:35:19 +00:00
attributions continued
This commit is contained in:
parent
1df893af9c
commit
c9f0a367c0
1 changed files with 6 additions and 3 deletions
|
@ -1214,7 +1214,8 @@ class Activity
|
|||
}
|
||||
}
|
||||
|
||||
$activity['attributedTo'] = Channel::getDidResolver($item['author'], true);
|
||||
|
||||
$activity['attributedTo'] = self::actorEncode($item['author'],false);
|
||||
|
||||
if ($item['mid'] === $item['parent_mid']) {
|
||||
if (in_array($item['comment_policy'], ['self', 'none']) || $item['item_nocomment'] || ($item['comments_closed'] > NULL_DATE && Time::convert('UTC', 'UTC', $item['comments_closed']) <= Time::convert())) {
|
||||
|
@ -5183,6 +5184,7 @@ class Activity
|
|||
if (!isset($channel['xchan_hash'])) {
|
||||
$channel = Channel::from_hash($channel['channel_hash']);
|
||||
}
|
||||
$isNomadic = PConfig::Get($channel['channel_id'], 'system', 'nomadicAP');
|
||||
$item = ((new Item())
|
||||
->setUid($channel['channel_id'])
|
||||
->setVerb('Add')
|
||||
|
@ -5198,7 +5200,7 @@ class Activity
|
|||
->setTarget([
|
||||
'id' => str_replace('/item/','/conversation/', $target),
|
||||
'type' => 'Collection',
|
||||
'attributedTo' => Channel::getDidResolver($channel, true)
|
||||
'attributedTo' => (($isNomadic) ? Channel::getDidResolver($channel, true) : z_root() . '/channel/' . $channel['channel_address']),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
@ -5221,6 +5223,7 @@ class Activity
|
|||
if (!isset($channel['xchan_hash'])) {
|
||||
$channel = Channel::from_hash($channel['channel_hash']);
|
||||
}
|
||||
$isNomadic = PConfig::Get($channel['channel_id'], 'system', 'nomadicAP');
|
||||
$item = ((new Item())
|
||||
->setUid($channel['channel_id'])
|
||||
->setVerb('Remove')
|
||||
|
@ -5235,7 +5238,7 @@ class Activity
|
|||
->setTarget([
|
||||
'id' => str_replace('/item/','/conversation/', $target),
|
||||
'type' => 'Collection',
|
||||
'attributedTo' => Channel::getDidResolver($channel, true)
|
||||
'attributedTo' => (($isNomadic) ? Channel::getDidResolver($channel, true) : z_root() . '/channel/' . $channel['channel_address']),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue