@social-mail/social-mail-web-server 1.7.533 → 1.7.536

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.533",
3
+ "version": "1.7.536",
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.8.106"
8
+ version: "1.8.108"
9
9
  });
10
10
 
11
11
  await config.saveVersion(WebComponentsPackageConfig, {
@@ -271,6 +271,11 @@ export default class EmailReferenceService {
271
271
  return;
272
272
  }
273
273
 
274
+ const mailboxID = entity.senderID;
275
+ const hosted = await this.emailAddressService.getHostedMailbox(mailboxID);
276
+ if (!hosted) {
277
+ return;
278
+ }
274
279
  const { emailID } = entity;
275
280
 
276
281
  await this.db.emailAddresses.where(entity, (p) =>
@@ -282,8 +287,11 @@ export default class EmailReferenceService {
282
287
 
283
288
  const now = DateTime.now;
284
289
 
290
+
285
291
  for (const { emailAddressID } of entity.recipients) {
286
- const mailboxID = entity.senderID;
292
+
293
+ // we should save this only if sender is hosted on our system...
294
+
287
295
  await this.db.mailboxContacts.statements.upsert({
288
296
  mailboxID,
289
297
  emailAddressID,
@@ -41,7 +41,7 @@ export default class CreateChannelWorkflow extends Workflow<{ mailboxID, domainI
41
41
  await db.saveChanges();
42
42
  emailAddressID = mb.mailboxID;
43
43
  }
44
- firstSenderID = emailAddressID;
44
+ firstSenderID ??= emailAddressID;
45
45
  }
46
46
  await db.mailboxContacts.statements.insert({
47
47
  mailboxID,