Limit where were respond to test messages
This commit is contained in:
@@ -21,11 +21,12 @@ final class Test extends Process
|
||||
|
||||
public static function handle(Message $msg): bool
|
||||
{
|
||||
if ((strtolower($msg->user_to) !== 'all') || ! in_array(strtolower($msg->subject),self::testing))
|
||||
if (! self::canProcess($msg->echoarea)
|
||||
|| (strtolower($msg->user_to) !== 'all')
|
||||
|| (! in_array(strtolower($msg->subject),self::testing)))
|
||||
return FALSE;
|
||||
|
||||
// @todo Need to limit this to areas defined in config.
|
||||
Log::info(sprintf('%s:- Processing TEST message from (%s) [%s]',self::LOGKEY,$msg->user_from,$msg->fftn));
|
||||
Log::info(sprintf('%s:- Processing TEST message from (%s) [%s] in [%s]',self::LOGKEY,$msg->user_from,$msg->fftn,$msg->echoarea));
|
||||
|
||||
Notification::route('echomail',$msg->echoarea)->notify(new TestNotification($msg));
|
||||
|
||||
|
Reference in New Issue
Block a user