[NEW] Reduce the amount of DDP API calls on login screen (#11083)
parent
e10d3b4d82
commit
401e2e2277
@ -1,8 +1,6 @@ |
||||
RocketChat.authz.cachedCollection = new RocketChat.CachedCollection({ |
||||
name: 'permissions', |
||||
eventType: 'onLogged', |
||||
userRelated: false |
||||
eventType: 'onLogged' |
||||
}); |
||||
RocketChat.authz.cachedCollection.init(); |
||||
|
||||
this.ChatPermissions = RocketChat.authz.cachedCollection.collection; |
||||
|
@ -1,3 +1,5 @@ |
||||
Meteor.startup(() => |
||||
RocketChat.Notifications.onAll('deleteCustomSound', data => RocketChat.CustomSounds.remove(data.soundData)) |
||||
RocketChat.CachedCollectionManager.onLogin(() => |
||||
RocketChat.Notifications.onAll('deleteCustomSound', data => RocketChat.CustomSounds.remove(data.soundData)) |
||||
) |
||||
); |
||||
|
@ -1,3 +1,5 @@ |
||||
Meteor.startup(() => |
||||
RocketChat.Notifications.onAll('updateCustomSound', data => RocketChat.CustomSounds.update(data.soundData)) |
||||
RocketChat.CachedCollectionManager.onLogin(() => |
||||
RocketChat.Notifications.onAll('updateCustomSound', data => RocketChat.CustomSounds.update(data.soundData)) |
||||
) |
||||
); |
||||
|
Loading…
Reference in new issue