issue #178 continued

This commit is contained in:
Mike Macgirvin 2024-07-09 07:38:21 +10:00
parent 12ab9505ca
commit cff6074a75

View file

@ -3,6 +3,7 @@
namespace Code\Module;
use App;
use Code\Lib as Zlib;
use Code\Lib\Libsync;
use Code\Lib\Activity;
use Code\Lib\Time;
@ -171,8 +172,10 @@ class Like extends Controller
$arr = [];
$isNomadic = $channel && Zlib\PConfig::Get($channel['channel_id'], 'system', 'nomadicAP');
$arr['uuid'] = $uuid;
$arr['mid'] = Channel::getDidResolver($channel) . '/item/' . $uuid;
$arr['mid'] = (($isNomadic) ? Channel::getDidResolver($channel) : z_root()) . '/item/' . $uuid;
$post_type = (($item['resource_type'] === 'photo') ? t('photo') : t('status'));
if ($item['obj_type'] === ACTIVITY_OBJ_EVENT) {
@ -244,7 +247,7 @@ class Like extends Controller
$ulink = '[zrl=' . $item_author['xchan_url'] . ']' . $item_author['xchan_name'] . '[/zrl]';
$alink = '[zrl=' . $observer['xchan_url'] . ']' . $observer['xchan_name'] . '[/zrl]';
$plink = '[zrl=' . Channel::getDidResolver($channel) . '/display/?mid=' . gen_link_id($item['mid']) . ']' . $post_type . '[/zrl]';
$plink = '[zrl=' . (($isNomadic) ? Channel::getDidResolver($channel) : z_root()) . '/display/?mid=' . gen_link_id($item['mid']) . ']' . $post_type . '[/zrl]';
$arr['body'] = sprintf($bodyverb, $alink, $ulink, $plink);
}