mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:55:15 +00:00
fix o use portable_ids in replyto
This commit is contained in:
parent
f16b3433b6
commit
3b1d3d8959
1 changed files with 15 additions and 2 deletions
|
@ -561,7 +561,7 @@ class Notifier implements DaemonInterface
|
|||
return;
|
||||
}
|
||||
|
||||
// logger('recipients: ' . print_r(self::$recipients,true), LOGGER_NORMAL, LOG_DEBUG);
|
||||
// logger('recipients: ' . print_r(self::$recipients,true), LOGGER_NORMAL, LOG_DEBUG);
|
||||
|
||||
if (! count(self::$env_recips)) {
|
||||
self::$env_recips = ((self::$private) ? [] : null);
|
||||
|
@ -880,8 +880,21 @@ class Notifier implements DaemonInterface
|
|||
else {
|
||||
$audience[] = $parentItem['owner_xchan'];
|
||||
}
|
||||
return $audience;
|
||||
// convert to portable_id where needed
|
||||
$xchans = [];
|
||||
foreach ($audience as $recipient) {
|
||||
$result = q("select * from hubloc where hubloc_id_url = '%s' or hubloc_hash = '%s'",
|
||||
dbesc($recipient),
|
||||
dbesc($recipient)
|
||||
);
|
||||
if ($result) {
|
||||
$record = Libzot::zot_record_preferred($result);
|
||||
$xchans[] = $record['hubloc_hash'];
|
||||
}
|
||||
}
|
||||
return $xchans;
|
||||
}
|
||||
|
||||
public static function getAudienceFromItem($item)
|
||||
{
|
||||
$audience = 0;
|
||||
|
|
Loading…
Reference in a new issue