From e612938d5ea0ca7d53a3a56d87ba03068b02ca0f Mon Sep 17 00:00:00 2001 From: Rob Jansen Date: Fri, 29 Nov 2024 17:15:37 -0500 Subject: [PATCH] Send comment notifications when visibility changes Fixes #373 --- src/commentinfo.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commentinfo.php b/src/commentinfo.php index 89944c21d..26132e27b 100644 --- a/src/commentinfo.php +++ b/src/commentinfo.php @@ -1005,8 +1005,12 @@ function save_comment($req, Contact $acting_user) { Conf::advance_current_time($this->timeModified); } // do not notify on updates within 3 hours + // UNLESS the visibility type changed or this is a response $qa = ""; if ($this->timeNotified + 10800 < Conf::$now + || (($ctype & self::CTVIS_MASK) !== 0 + && ($this->commentType & self::CTVIS_MASK) !== 0 + && ($ctype & self::CTVIS_MASK) !== ($this->commentType & self::CTVIS_MASK)) || (($ctype & self::CT_RESPONSE) !== 0 && ($ctype & self::CT_DRAFT) === 0 && ($this->commentType & self::CT_DRAFT) !== 0)) {