diff options
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 22 |
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 |