diff options
author | Mario <mario@mariovavti.com> | 2024-01-01 20:04:24 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-01-01 20:04:24 +0000 |
commit | 2590e3c99be36f806fe25dd6db0504e853669fde (patch) | |
tree | 942a56c100b156beb091ac2f38206749e7dd413f /Zotlabs/Lib/ThreadItem.php | |
parent | 62db8c3969f783897ff2de1bf3250057c37eb422 (diff) | |
download | volse-hubzilla-2590e3c99be36f806fe25dd6db0504e853669fde.tar.gz volse-hubzilla-2590e3c99be36f806fe25dd6db0504e853669fde.tar.bz2 volse-hubzilla-2590e3c99be36f806fe25dd6db0504e853669fde.zip |
reveal repeat
Diffstat (limited to 'Zotlabs/Lib/ThreadItem.php')
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 037ddb19e..3cdb59e5f 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -121,12 +121,14 @@ class ThreadItem { $locktype = 0; } - $shareable = ((($conv->get_profile_owner() == local_channel() && local_channel()) && ($item['item_private'] != 1)) ? true : false); + $shareable = ((($conv->get_profile_owner() == local_channel() && local_channel()) && (intval($item['item_private']) === 0)) ? true : false); // allow an exemption for sharing stuff from your private feeds if($item['author']['xchan_network'] === 'rss') $shareable = true; + $repeatable = ((($conv->get_profile_owner() == local_channel() && local_channel()) && (intval($item['item_private']) === 0) && (in_array($item['author']['xchan_network'], ['zot6', 'activitypub']))) ? true : false); + // @fixme // Have recently added code to properly handle polls in group reshares by redirecting all of the poll responses to the group. // Sharing a poll using a regular embedded share is harder because the poll will need to fork. This is due to comment permissions. @@ -315,13 +317,11 @@ class ThreadItem { $share = []; $embed = []; if ($shareable) { - // This actually turns out not to be possible in some protocol stacks without opening up hundreds of new issues. - // Will allow it only for uri resolvable sources. - if(strpos($item['mid'],'http') === 0) { - //Not yet ready for primetime - //$share = array( t('Repeat This'), t('repeat')); - } - $embed = [t('Share This'), t('share')]; + $embed = [t('Share'), t('share')]; + } + + if ($repeatable) { + $share = [t('Repeat'), t('repeat')]; } $dreport = ''; |