Improve match of messages that come via matrix, so they dont get posted back

This commit is contained in:
Deon George 2024-09-09 19:44:14 +10:00
parent 693e88bc01
commit 9d06b422e0

View File

@ -29,7 +29,7 @@ class EchomailListener implements ShouldQueue
$ea = $event->eo->echoarea; $ea = $event->eo->echoarea;
// Catch our messages that we've posted, so they dont go back // 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; return;
if ($ea && collect(config('matrix.rooms'))->contains($ea->name)) { if ($ea && collect(config('matrix.rooms'))->contains($ea->name)) {