Skip to content

Commit 678877a

Browse files
authored
Merge pull request #1824 from appwrite/fix-domains-realtime
Fix domains realtime
2 parents a40930c + bcadcc2 commit 678877a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/lib/pages/domains/create.svelte

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@
1515
domain.set({ $id: '', domain: '' });
1616
1717
return realtime
18-
.forProject($page.params.region, $page.params.region)
19-
.subscribe<Models.ProxyRule>('console', (data) => domain.set(data.payload));
18+
.forProject($page.params.region, $page.params.project)
19+
.subscribe<Models.ProxyRule>('console', (message) => {
20+
if (
21+
message.channels.includes(`projects.${$page.params.project}`) &&
22+
message.events.includes('rules.*')
23+
) {
24+
domain.set(message.payload);
25+
}
26+
});
2027
});
2128
2229
async function onFinish() {

0 commit comments

Comments
 (0)