summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2021-12-29 00:03:44 +0900
committertamaina <tamaina@hotmail.co.jp>2021-12-29 00:03:44 +0900
commitf9f64a5e4cadd012e3a6809122a962387029181c (patch)
tree7fc869613606d8788fe78a032f3cc899be4938d9
parentwip? (diff)
downloadmisskey-f9f64a5e4cadd012e3a6809122a962387029181c.tar.gz
misskey-f9f64a5e4cadd012e3a6809122a962387029181c.tar.bz2
misskey-f9f64a5e4cadd012e3a6809122a962387029181c.zip
?
-rw-r--r--packages/client/src/pizzax.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/client/src/pizzax.ts b/packages/client/src/pizzax.ts
index 8672276fe7..f405ed855b 100644
--- a/packages/client/src/pizzax.ts
+++ b/packages/client/src/pizzax.ts
@@ -73,8 +73,10 @@ export class Storage<T extends StateDef> {
}, 1);
// streamingのuser storage updateイベントを監視して更新
- this.connection.on('registryUpdated', ({ scope, key, value }) => {
- this.state[key] = value as typeof this.state[key]['default'];
+ this.connection.on('registryUpdated', ({ scope, key, value }: { scope: string[], key: keyof T, value: T[typeof key]['default'] }) => {
+ if (scope[1] !== this.key) return;
+
+ this.state[key] = value;
this.reactiveState[key].value = value;
const cache = JSON.parse(localStorage.getItem(this.keyForLocalStorage + '::cache::' + $i.id) || '{}');