diff options
author | Mario <mario@mariovavti.com> | 2023-06-23 12:35:41 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-06-23 12:35:41 +0000 |
commit | 12b2137a044ff6fd48239e207e5ad9350ceaf5e5 (patch) | |
tree | 40fbddc372fe7701a2953d9c7f2239baba0d25f5 /Zotlabs | |
parent | cd26ead043f9cb92ca4d59e587480520cb51f117 (diff) | |
download | volse-hubzilla-12b2137a044ff6fd48239e207e5ad9350ceaf5e5.tar.gz volse-hubzilla-12b2137a044ff6fd48239e207e5ad9350ceaf5e5.tar.bz2 volse-hubzilla-12b2137a044ff6fd48239e207e5ad9350ceaf5e5.zip |
fix relaying and syncing in Activity::drop(), change wording for moderation request notices and redirect moderation request for reactions to mod moderate
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 12 | ||||
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 13 | ||||
-rw-r--r-- | Zotlabs/Module/Hq.php | 7 |
3 files changed, 23 insertions, 9 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 433024cf0..e2618625f 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1591,10 +1591,17 @@ class Activity { } if (in_array($observer, [$r[0]['author_xchan'], $r[0]['owner_xchan']])) { - drop_item($r[0]['id'], false); + drop_item($r[0]['id'], false, (($r[0]['item_wall']) ? DROPITEM_PHASE1 : DROPITEM_NORMAL)); } elseif (in_array($act->actor['id'], [$r[0]['author_xchan'], $r[0]['owner_xchan']])) { - drop_item($r[0]['id'], false); + drop_item($r[0]['id'], false, (($r[0]['item_wall']) ? DROPITEM_PHASE1 : DROPITEM_NORMAL)); } + + sync_an_item($channel['channel_id'], $r[0]['id']); + + if ($r[0]['item_wall']) { + Master::Summon(['Notifier', 'drop', $r[0]['id']]); + } + } @@ -2970,7 +2977,6 @@ class Activity { }*/ if (!$allowed) { - if (get_pconfig($channel['channel_id'], 'system', 'moderate_unsolicited_comments')) { $item['item_blocked'] = intval(ITEM_MODERATED); $allowed = true; diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index a8d34b940..1eb05da08 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -158,10 +158,10 @@ class Enotify { } if(activity_match($params['verb'], ACTIVITY_LIKE)) - $action = t('liked'); + $action = (($moderated) ? t('requests to like') : t('liked')); if(activity_match($params['verb'], ACTIVITY_DISLIKE)) - $action = t('disliked'); + $action = (($moderated) ? t('requests to dislike') : t('disliked')); } @@ -307,7 +307,14 @@ class Enotify { $parent_item = $p[0]; - $verb = ((activity_match($params['item']['verb'], ACTIVITY_DISLIKE)) ? t('disliked') : t('liked')); + //$verb = ((activity_match($params['item']['verb'], ACTIVITY_DISLIKE)) ? t('disliked') : t('liked')); + $moderated = (($params['item']['item_blocked'] == ITEM_MODERATED) ? true : false); + + if(activity_match($params['item']['verb'], ACTIVITY_LIKE)) + $verb = (($moderated) ? t('requests to like') : t('liked')); + + if(activity_match($params['item']['verb'], ACTIVITY_DISLIKE)) + $verb = (($moderated) ? t('requests to dislike') : t('disliked')); // "your post" if($p[0]['owner']['xchan_name'] === $p[0]['author']['xchan_name'] && intval($p[0]['item_wall'])) diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php index efa13b832..260d0c41b 100644 --- a/Zotlabs/Module/Hq.php +++ b/Zotlabs/Module/Hq.php @@ -67,9 +67,10 @@ class Hq extends \Zotlabs\Web\Controller { } } - //if the item is to be moderated redirect to /moderate - if($target_item['item_blocked'] == ITEM_MODERATED) { - // goaway(z_root() . '/moderate/' . $target_item['id']); + // if the item is to be moderated redirect to /moderate + // comments can be moderated inline + if(intval($target_item['item_blocked']) === ITEM_MODERATED && in_array($target_item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDMAYBE, ACTIVITY_ATTENDNO])) { + goaway(z_root() . '/moderate/' . $target_item['id']); } $simple_update = ''; |