mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix events that return non user objects
This commit is contained in:
1 parent
61b114a999
commit
78c413ee30
1 file changed
+7
@@ -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()];
|
||||
|
||||
Reference in new issue
Block a user