Merge branch 'dev' of ../p3 into dev

This commit is contained in:
nobody 2021-04-17 19:07:17 -07:00
commit 0d17153411

View file

@ -400,15 +400,20 @@ class Notifier {
if (($relay_to_owner || $uplink) && ($cmd !== 'relay')) { if (($relay_to_owner || $uplink) && ($cmd !== 'relay')) {
logger('followup relay (upstream delivery)', LOGGER_DEBUG); logger('followup relay (upstream delivery)', LOGGER_DEBUG);
$sendto = ($uplink) ? $parent_item['source_xchan'] : $parent_item['owner_xchan']; $sendto = ($uplink) ? $parent_item['source_xchan'] : $parent_item['owner_xchan'];
self::$recipients = [ $sendto ];
if (defined('X-REPLY-TO')) { if (defined('X-REPLY-TO')) {
// experimental until debugging is completed // experimental until debugging is completed
if ($parent_item['replyto']) {
if ($parent_item['replyto'] && (! $uplink)) {
$ptr = unserialise($parent_item['replyto']); $ptr = unserialise($parent_item['replyto']);
if (is_string($ptr)) { if (is_string($ptr)) {
$sendto = $ptr; if (ActivityStreams::is_url($sendto)) {
self::$recipients = [ $sendto ]; $sendto = $ptr;
self::$recipients = [ $sendto ];
}
} }
elseif (is_array($tr)) { elseif (is_array($ptr)) {
$sendto = []; $sendto = [];
foreach ($ptr as $rto) { foreach ($ptr as $rto) {
if (is_string($rto)) { if (is_string($rto)) {
@ -421,10 +426,10 @@ if (defined('X-REPLY-TO')) {
self::$recipients = $sendto; self::$recipients = $sendto;
} }
} }
else // X-REPLY-TO
self::$recipients = [ $sendto ];
} }
// END X-REPLY-TO // END defined('X-REPLY-TO')
self::$private = true; self::$private = true;
$upstream = true; $upstream = true;
self::$packet_type = 'response'; self::$packet_type = 'response';