From 78c413ee30d0ae0040f7f491084bc1578f01f8b1 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 2 Mar 2021 19:07:58 +0100 Subject: [PATCH] fix events that return non user objects --- src/Appwrite/Event/Realtime.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Appwrite/Event/Realtime.php b/src/Appwrite/Event/Realtime.php index 19f076a266..cbae7d4623 100644 --- a/src/Appwrite/Event/Realtime.php +++ b/src/Appwrite/Event/Realtime.php @@ -109,6 +109,13 @@ class Realtime private function prepareChannels(): void { switch (true) { + case strpos($this->event, 'account.recovery.') === 0: + case strpos($this->event, 'account.sessions.') === 0: + case strpos($this->event, 'account.verification.') === 0: + $this->channels[] = 'account.' . $this->payload->getAttribute('userId'); + $this->permissions = ['user:' . $this->payload->getAttribute('userId')]; + + break; case strpos($this->event, 'account.') === 0: $this->channels[] = 'account.' . $this->payload->getId(); $this->permissions = ['user:' . $this->payload->getId()];