From fe0af8e2cd33859ba636b943471fb7e45a06dd06 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 17 Jan 2024 15:06:10 +1300 Subject: [PATCH] Add missing provider filter for targets --- src/Appwrite/Platform/Workers/Messaging.php | 2 ++ 1 file changed, 2 insertions(+) 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); }