fix: live query role cache does not clear when a user is added to a role (#8026)

This commit is contained in:
dblythy
2022-06-11 18:21:55 +10:00
committed by GitHub
parent 0cd902b8c2
commit 199dfc1722
6 changed files with 108 additions and 2 deletions

View File

@@ -19,6 +19,13 @@ class ParseCloudCodePublisher {
this._onCloudCodeMessage(Parse.applicationId + 'afterDelete', request);
}
onClearCachedRoles(user: Parse.Object) {
this.parsePublisher.publish(
Parse.applicationId + 'clearCache',
JSON.stringify({ userId: user.id })
);
}
// Request is the request object from cloud code functions. request.object is a ParseObject.
_onCloudCodeMessage(type: string, request: any): void {
logger.verbose(