aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-06-23 09:13:51 +0000
committerMario <mario@mariovavti.com>2023-06-23 09:13:51 +0000
commitcd26ead043f9cb92ca4d59e587480520cb51f117 (patch)
tree6ffd776a1fa31f6dfb8462bd71c6a0b62157d3b2 /Zotlabs/Lib/Activity.php
parent6a560cfec4628ac5c727578c1360f84c569ee6b7 (diff)
downloadvolse-hubzilla-cd26ead043f9cb92ca4d59e587480520cb51f117.tar.gz
volse-hubzilla-cd26ead043f9cb92ca4d59e587480520cb51f117.tar.bz2
volse-hubzilla-cd26ead043f9cb92ca4d59e587480520cb51f117.zip
implement optional moderation of unsolicited comments, minor css fixes and some more work on ocap
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php22
1 files changed, 16 insertions, 6 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 79821badc..433024cf0 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -2970,13 +2970,23 @@ class Activity {
}*/
if (!$allowed) {
- logger('rejected comment from ' . $item['author_xchan'] . ' for ' . $channel['channel_address']);
- logger('rejected: ' . print_r($item, true), LOGGER_DATA);
- // TODO: not implemented
- // let the sender know we received their comment but we don't permit spam here.
- // self::send_rejection_activity($channel,$item['author_xchan'],$item);
- return;
+ if (get_pconfig($channel['channel_id'], 'system', 'moderate_unsolicited_comments')) {
+ $item['item_blocked'] = intval(ITEM_MODERATED);
+ $allowed = true;
+ }
+ else {
+ hz_syslog('rejected comment from ' . $item['author_xchan'] . ' for ' . $channel['channel_address']);
+ logger('rejected: ' . print_r($item, true), LOGGER_DATA);
+
+ // TODO: not implemented
+ // let the sender know we received their comment but we don't permit spam here.
+ // self::send_rejection_activity($channel,$item['author_xchan'],$item);
+
+ return;
+ }
+
+
}
// TODO: not implemented