@social-mail/social-mail-web-server 1.7.78 → 1.7.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.7.78",
3
+ "version": "1.7.79",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -291,10 +291,13 @@ export default class EmailEvents extends AuthenticatedEvents<Email> {
291
291
  }
292
292
 
293
293
  preJson(entity: Email): Email {
294
- if (entity.status === "published") {
295
- this.sessionSecurity.injectPublicKey(entity);
296
- } else {
297
- this.sessionSecurity.injectKey(entity);
294
+ switch(entity.status) {
295
+ case "published":
296
+ this.sessionSecurity.injectPublicKey(entity);
297
+ break;
298
+ default:
299
+ this.sessionSecurity.injectKey(entity);
300
+ break;
298
301
  }
299
302
  entity.statePostReceiveInvoked = void 0;
300
303
  entity.stateReferencesUpdated = void 0;