mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
chore: fix forloop
This commit is contained in:
parent
0ddcb9b14c
commit
28896081d7
1 changed files with 13 additions and 11 deletions
|
|
@ -86,17 +86,19 @@ class Realtime extends Event
|
|||
? $this->getTargets()
|
||||
: [$target['projectId'] ?? $this->getProject()->getId()];
|
||||
|
||||
RealtimeAdapter::send(
|
||||
projectId: $projectIds,
|
||||
payload: $this->getRealtimePayload(),
|
||||
events: $allEvents,
|
||||
channels: $target['channels'],
|
||||
roles: $target['roles'],
|
||||
options: [
|
||||
'permissionsChanged' => $target['permissionsChanged'],
|
||||
'userId' => $this->getParam('userId')
|
||||
]
|
||||
);
|
||||
foreach ($projectIds as $projectId) {
|
||||
RealtimeAdapter::send(
|
||||
projectId: $projectId,
|
||||
payload: $this->getRealtimePayload(),
|
||||
events: $allEvents,
|
||||
channels: $target['channels'],
|
||||
roles: $target['roles'],
|
||||
options: [
|
||||
'permissionsChanged' => $target['permissionsChanged'],
|
||||
'userId' => $this->getParam('userId')
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue