@social-mail/social-mail-web-server 1.7.392 → 1.7.397

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.392",
3
+ "version": "1.7.397",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -5,7 +5,7 @@ export default async function seedUI(config: DBConfig) {
5
5
  await config.saveVersion(UIPackageConfig, {
6
6
  package: "@social-mail/social-mail-client",
7
7
  view: "dist/web/AppIndex",
8
- version: "1.4.223"
8
+ version: "1.5.10"
9
9
  });
10
10
 
11
11
  await config.saveVersion(WebComponentsPackageConfig, {
@@ -27,7 +27,7 @@ export default class MailboxNamespace extends SocketNamespace {
27
27
  }
28
28
 
29
29
  @Send
30
- newMail(room: number, fromID: number, emailID: number) {
30
+ newMail(room: number, fromID: number, emailID: number, silent: boolean) {
31
31
  // do nothing..
32
32
  console.log(`This should not be called...`);
33
33
  }
@@ -292,9 +292,6 @@ export default class EmailPostReceiveService {
292
292
  return;
293
293
  }
294
294
 
295
- const mn = ServiceProvider.resolve(this, MailboxNamespace);
296
- mn.newMail(input.recipientID, input.senderID, input.emailID);
297
-
298
295
  if (ne.timeRead) {
299
296
  return;
300
297
  }
@@ -192,9 +192,13 @@ export default class EmailReferenceService {
192
192
  // DateTime.from(email.dateSent));
193
193
  // }
194
194
 
195
- if(!silent) {
196
- socketService.mailboxRoom.newMail(mailboxID, emailAddressID, emailID);
197
- }
195
+ /**
196
+ * This should go to everyone as client may need to refresh the UI, however silent will indicate
197
+ * whether to show any notification or not.
198
+ *
199
+ * This has to be setup here as PostReceive workflow will not be executed for sent items.
200
+ * */
201
+ socketService.mailboxRoom.newMail(mailboxID, emailAddressID, emailID, silent);
198
202
 
199
203
  if (addFolder) {
200
204
  await db.mailboxFolders.statements.upsert({
@@ -48,9 +48,7 @@ export default class UpdateMailboxThreads extends Workflow<IMailboxThreadInfo> {
48
48
  * 2. Check if email is an action (subscribe/unsubscribe)
49
49
  */
50
50
 
51
- if(!silent) {
52
- socketService.mailboxRoom.newMail(mailboxID, emailAddressID, lastEmailID);
53
- }
51
+ socketService.mailboxRoom.newMail(mailboxID, emailAddressID, lastEmailID, silent);
54
52
 
55
53
  const domainID = await emailAddressService.lookupDomainID(emailAddressID);
56
54
  const referrerDomainID = await emailAddressService.lookupDomainID(mailboxID);