mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:55:15 +00:00
Merge branch 'dev' into collect
This commit is contained in:
commit
85dd35848d
1 changed files with 13 additions and 0 deletions
|
@ -1200,6 +1200,7 @@ class Libzot
|
|||
|
||||
if ($env['encoding'] === 'activitystreams') {
|
||||
$AS = new ActivityStreams($data, portable_id: $env['sender']);
|
||||
<<<<<<< HEAD
|
||||
|
||||
if ($AS->is_valid()) {
|
||||
if ($AS->type === 'Announce' && is_array($AS->obj)
|
||||
|
@ -1225,6 +1226,18 @@ class Libzot
|
|||
}
|
||||
}
|
||||
else {
|
||||
=======
|
||||
if (
|
||||
$AS->is_valid() && $AS->type === 'Announce' && is_array($AS->obj)
|
||||
&& array_key_exists('object', $AS->obj) && array_key_exists('actor', $AS->obj)
|
||||
) {
|
||||
// This is a relayed/forwarded Activity (as opposed to a shared/boosted object)
|
||||
// Reparse the encapsulated Activity and use that instead
|
||||
logger('relayed activity', LOGGER_DEBUG);
|
||||
$AS = new ActivityStreams($AS->obj, portable_id: $env['sender']);
|
||||
}
|
||||
if (!$AS->is_valid()) {
|
||||
>>>>>>> dev
|
||||
logger('Activity rejected: ' . print_r($data, true));
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue