chat: initiate associations in store
@@ -4,6 +4,7 @@ import { ContactUpdateReducer } from '/reducers/contact-update';
import { ChatUpdateReducer } from '/reducers/chat-update';
import { InviteUpdateReducer } from '/reducers/invite-update';
import { PermissionUpdateReducer } from '/reducers/permission-update';
+import { MetadataReducer } from '/reducers/metadata-update.js';
import { LocalReducer } from '/reducers/local.js';
@@ -15,6 +16,7 @@ class Store {
contacts: {},
permissions: {},
invites: {},
+ associations: new Map,
spinner: false,
sidebarShown: true,
pendingMessages: new Map([]),
@@ -27,6 +29,7 @@ class Store {
this.contactUpdateReducer = new ContactUpdateReducer();
this.chatUpdateReducer = new ChatUpdateReducer();
this.inviteUpdateReducer = new InviteUpdateReducer();
+ this.metadataReducer = new MetadataReducer();
this.localReducer = new LocalReducer();
this.setState = () => {};
}
@@ -45,6 +48,7 @@ class Store {
this.contactUpdateReducer.reduce(json, this.state);
this.chatUpdateReducer.reduce(json, this.state);
this.inviteUpdateReducer.reduce(json, this.state);
+ this.metadataReducer.reduce(json, this.state);
this.localReducer.reduce(json, this.state);
this.setState(this.state);
