fix k&t url, add followers to "upstream" public comments on uncontained conversations

This commit is contained in:
Mike Macgirvin 2024-05-10 04:24:58 +10:00
parent 52e5fc545c
commit 634608fe01
2 changed files with 5 additions and 2 deletions

View file

@ -27,7 +27,7 @@ A Yunohost install is present in
https://apps.yunohost.org/app/streams
Managed hosting is available from
https://knthost.com
https://knthost.com/streams
Language translation instructions are provided in
https://codeberg.org/streams/streams/src/branch/release/util/README

View file

@ -443,9 +443,12 @@ class Notifier implements DaemonInterface
self::$private = true;
$upstream = true;
self::$packet_type = 'response';
// send public replies to your followers if using hyperdrive or if this is not a contained conversation;
// for instance if the thread is from a microblog platform.
$isContained = str_contains($parent_item['tgt_type'], 'Collection') || ($parent_item['item_restrict'] & 4);
$is_moderated = their_perms_contains($parent_item['uid'], (is_array($sendto) ? $sendto[0] : $sendto), 'moderated');
if ($relay_to_owner && $thread_is_public && (! $is_moderated) && (! $question) && (! Channel::is_group($parent_item['uid']))) {
if (get_pconfig($target_item['uid'], 'system', 'hyperdrive', true)) {
if (get_pconfig($target_item['uid'], 'system', 'hyperdrive', true) || !$isContained) {
Run::Summon([ 'Notifier' , 'hyper', $item_id ]);
}
}