diff options
author | zotlabs <mike@macgirvin.com> | 2020-02-10 15:34:33 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2020-02-10 15:34:33 -0800 |
commit | d4a6aa7801d7bad862436990418a7aba34ddef1f (patch) | |
tree | 76b9e09297d32016dbbeb7b32915968a2105a407 /Zotlabs | |
parent | b767bda4105b141d71b94d4fdd4d6332f775db1a (diff) | |
download | volse-hubzilla-d4a6aa7801d7bad862436990418a7aba34ddef1f.tar.gz volse-hubzilla-d4a6aa7801d7bad862436990418a7aba34ddef1f.tar.bz2 volse-hubzilla-d4a6aa7801d7bad862436990418a7aba34ddef1f.zip |
this allows polls to federate from hubzilla to zap, though still a remaining issue with voting
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 11 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 6 |
2 files changed, 14 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 5a406beb7..1ac3135db 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -592,8 +592,15 @@ class Activity { } } - - $ret['id'] = ((strpos($i['mid'],'http') === 0) ? $i['mid'] : z_root() . '/activity/' . urlencode($i['mid'])); + if (strpos($i['mid'],z_root() . '/item/') !== false) { + $ret['id'] = str_replace('/item/','/activity/',$i['mid']); + } + elseif (strpos($i['mid'],z_root() . '/event/') !== false) { + $ret['id'] = str_replace('/event/','/activity/',$i['mid']); + } + else { + $ret['id'] = ((strpos($i['mid'],'http') === 0) ? $i['mid'] : z_root() . '/activity/' . urlencode($i['mid'])); + } if($i['title']) $ret['name'] = html2plain(bbcode($i['title'], [ 'cache' => true ])); diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index e55192c7f..dbcbe5d22 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -976,7 +976,11 @@ class Item extends Controller { $plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . gen_link_id($mid); $plink = substr($plink,0,190); } - + + if ($datarray['obj']) { + $datarray['obj']['id'] = $mid; + } + $datarray['aid'] = $channel['channel_account_id']; $datarray['uid'] = $profile_uid; $datarray['uuid'] = $uuid; |