diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index cf05b42d43..ca33b26d69 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); }