From 9d06b422e0ee2e58c9f9002d92fc210c8ff97096 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 9 Sep 2024 19:44:14 +1000 Subject: [PATCH] Improve match of messages that come via matrix, so they dont get posted back --- app/Listeners/EchomailListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Listeners/EchomailListener.php b/app/Listeners/EchomailListener.php index 138f9ed..d4d2e71 100644 --- a/app/Listeners/EchomailListener.php +++ b/app/Listeners/EchomailListener.php @@ -29,7 +29,7 @@ class EchomailListener implements ShouldQueue $ea = $event->eo->echoarea; // Catch our messages that we've posted, so they dont go back - if (str_ends_with($event->eo->from,':'.config('matrix.server'))) + if (preg_match('/^@.+:/',$event->eo->from)) return; if ($ea && collect(config('matrix.rooms'))->contains($ea->name)) {