From 3aefe23184c25c1fc0865313d13902cabfb934d3 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 20 Dec 2023 12:15:24 +0000 Subject: changelog --- CHANGELOG | 5 +++++ Zotlabs/Daemon/Notifier.php | 2 +- Zotlabs/Lib/Activity.php | 30 ++++++++++++++++-------------- Zotlabs/Lib/ThreadItem.php | 18 ++++++++++-------- Zotlabs/Module/Share.php | 4 +++- include/text.php | 3 +-- 6 files changed, 36 insertions(+), 26 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d4c6b3fc0..fe5a3924a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +Hubzilla 8.8.4 (2023-12-20) + - Fix regression introduced in version 8.8.3 + - Add active addons and blocked sites to siteinfo + + Hubzilla 8.8.3 (2023-12-17) - Check return from Config::Load() and retry on failure - Libzot::import() do not prozess items where we could not fetch the author diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 4b74a7ba9..8cdf0e511 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -300,7 +300,7 @@ class Notifier { return; } - if ($target_item['verb'] === ACTIVITY_SHARE) { + if ($target_item['verb'] === 'Announce') { // Provide correct representation across the wire. Internally this is treated as a comment. $target_item['parent_mid'] = $target_item['thr_parent'] = $target_item['mid']; } diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 835909849..7e38ace34 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1194,7 +1194,7 @@ class Activity { $acts = [ 'http://activitystrea.ms/schema/1.0/post' => 'Create', - 'http://activitystrea.ms/schema/1.0/share' => 'Announce', + // 'http://activitystrea.ms/schema/1.0/share' => 'Announce', 'http://activitystrea.ms/schema/1.0/update' => 'Update', 'http://activitystrea.ms/schema/1.0/like' => 'Like', 'http://activitystrea.ms/schema/1.0/favorite' => 'Like', @@ -1208,7 +1208,8 @@ class Activity { 'http://purl.org/zot/activity/attendmaybe' => 'TentativeAccept', 'Invite' => 'Invite', 'Delete' => 'Delete', - 'Undo' => 'Undo' + 'Undo' => 'Undo', + 'Announce' => 'Announce', ]; call_hooks('activity_mapper', $acts); @@ -1242,7 +1243,7 @@ class Activity { $acts = [ 'http://activitystrea.ms/schema/1.0/post' => 'Create', - 'http://activitystrea.ms/schema/1.0/share' => 'Announce', + // 'http://activitystrea.ms/schema/1.0/share' => 'Announce', 'http://activitystrea.ms/schema/1.0/update' => 'Update', 'http://activitystrea.ms/schema/1.0/like' => 'Like', 'http://activitystrea.ms/schema/1.0/favorite' => 'Like', @@ -1256,7 +1257,8 @@ class Activity { 'http://purl.org/zot/activity/attendmaybe' => 'TentativeAccept', 'Invite' => 'Invite', 'Delete' => 'Delete', - 'Undo' => 'Undo' + 'Undo' => 'Undo', + 'Announce' => 'Announce' ]; call_hooks('activity_decode_mapper', $acts); @@ -1284,11 +1286,11 @@ class Activity { 'http://activitystrea.ms/schema/1.0/profile-photo' => 'Icon', 'http://activitystrea.ms/schema/1.0/event' => 'Event', 'http://purl.org/zot/activity/location' => 'Place', - 'http://purl.org/zot/activity/chessgame' => 'Game', - 'http://purl.org/zot/activity/tagterm' => 'zot:Tag', - 'http://purl.org/zot/activity/thing' => 'Object', - 'http://purl.org/zot/activity/file' => 'zot:File', - 'http://purl.org/zot/activity/mood' => 'zot:Mood', + // 'http://purl.org/zot/activity/chessgame' => 'Game', + // 'http://purl.org/zot/activity/tagterm' => 'zot:Tag', + // 'http://purl.org/zot/activity/thing' => 'Object', + // 'http://purl.org/zot/activity/file' => 'zot:File', + // 'http://purl.org/zot/activity/mood' => 'zot:Mood', 'Invite' => 'Invite', 'Question' => 'Question', 'Document' => 'Document', @@ -1321,11 +1323,11 @@ class Activity { 'http://activitystrea.ms/schema/1.0/profile-photo' => 'Icon', 'http://activitystrea.ms/schema/1.0/event' => 'Event', 'http://purl.org/zot/activity/location' => 'Place', - 'http://purl.org/zot/activity/chessgame' => 'Game', - 'http://purl.org/zot/activity/tagterm' => 'zot:Tag', - 'http://purl.org/zot/activity/thing' => 'Object', - 'http://purl.org/zot/activity/file' => 'zot:File', - 'http://purl.org/zot/activity/mood' => 'zot:Mood', + // 'http://purl.org/zot/activity/chessgame' => 'Game', + // 'http://purl.org/zot/activity/tagterm' => 'zot:Tag', + // 'http://purl.org/zot/activity/thing' => 'Object', + // 'http://purl.org/zot/activity/file' => 'zot:File', + // 'http://purl.org/zot/activity/mood' => 'zot:Mood', 'Invite' => 'Invite', 'Question' => 'Question', 'Audio' => 'Audio', diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 037ddb19e..927da5434 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -121,7 +121,9 @@ 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); + $repeatable = ((($conv->get_profile_owner() == local_channel() && local_channel()) && (intval($item['item_private']) === 0) && (in_array($item['author']['xchan_network'], ['zot6', 'activitypub']))) ? true : false); + // allow an exemption for sharing stuff from your private feeds if($item['author']['xchan_network'] === 'rss') @@ -315,13 +317,13 @@ 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('Reshare'), t('reshare')]; + } + + // 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($repeatable) { + $share = [t('Repeat'), t('repeat')]; } $dreport = ''; diff --git a/Zotlabs/Module/Share.php b/Zotlabs/Module/Share.php index 716f7229b..576a415af 100644 --- a/Zotlabs/Module/Share.php +++ b/Zotlabs/Module/Share.php @@ -68,6 +68,7 @@ class Share extends \Zotlabs\Web\Controller { $owner_uid = $r[0]['uid']; $owner_aid = $r[0]['aid']; +/* $can_comment = false; if((array_key_exists('owner',$item)) && intval($item['owner']['abook_self'])) $can_comment = perm_is_allowed($item['uid'],$observer['xchan_hash'],'post_comments'); @@ -78,6 +79,7 @@ class Share extends \Zotlabs\Web\Controller { notice( t('Permission denied') . EOL); killme(); } +*/ $r = q("select * from xchan where xchan_hash = '%s' limit 1", dbesc($item['owner_xchan']) @@ -113,7 +115,7 @@ class Share extends \Zotlabs\Web\Controller { $arr['owner_xchan'] = $item['author_xchan']; $arr['obj'] = Activity::encode_item($item); $arr['obj_type'] = $item['obj_type']; - $arr['verb'] = ACTIVITY_SHARE; + $arr['verb'] = 'Announce'; //ACTIVITY_SHARE; $post = item_store($arr); diff --git a/include/text.php b/include/text.php index 27dd94bc5..b9e3835e7 100644 --- a/include/text.php +++ b/include/text.php @@ -1798,8 +1798,7 @@ function prepare_body(&$item,$attach = false,$opts = false) { } } - - $poll = (($item['obj_type'] === 'Question' && in_array($item['verb'],[ ACTIVITY_POST, ACTIVITY_UPDATE, ACTIVITY_SHARE ])) ? format_poll($item, $s, $opts) : false); + $poll = (($item['obj_type'] === 'Question' && in_array($item['verb'],[ ACTIVITY_POST, ACTIVITY_UPDATE ])) ? format_poll($item, $s, $opts) : false); if ($poll) { $s = $poll; } -- cgit v1.2.3