diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 11621d422e..d0690d62b8 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -123,6 +123,8 @@ class Messaging extends Action Query::equal('$id', $targetIds), Query::limit(\count($targetIds)), ]); + $targets = \array_filter($targets, fn(Document $target) => + $target->getAttribute('providerType') === $message->getAttribute('providerType')); $recipients = \array_merge($recipients, $targets); }