@social-mail/social-mail-web-server 1.7.293 → 1.7.294

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.293",
3
+ "version": "1.7.294",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
 
2
- import Inject, { RegisterScoped, RegisterSingleton, RegisterTransient, ServiceCollection, ServiceObject, ServiceProvider } from "@entity-access/entity-access/dist/di/di.js";
2
+ import Inject, { RegisterSingleton, ServiceObject, ServiceProvider } from "@entity-access/entity-access/dist/di/di.js";
3
3
  import SocialMailContext from "../../model/SocialMailContext.js";
4
4
  import { cacheFor, ICacheContainer, ObjectCache } from "../../../common/cacheFor.js";
5
5
  import MessagingService from "../../services/message-events/MessagingService.js";
@@ -21,13 +21,13 @@ export default class WebSiteChannelService
21
21
 
22
22
  host = host?.toLocaleLowerCase() ?? "localhost";
23
23
 
24
- const mailboxeList = await db.mailboxes.where({ host}, (p) => (x) =>
24
+ const mailboxList = await db.mailboxes.where({ host}, (p) => (x) =>
25
25
  x.websiteChannels
26
26
  .some((w) => w.website.hosts
27
27
  .some((h)=> h.host === p.host)))
28
28
  .toArray();
29
29
 
30
- const mailboxes = mailboxeList.map((x) => x.mailboxID);
30
+ const mailboxes = mailboxList.map((x) => x.mailboxID);
31
31
 
32
32
  const domainList = await db.hostedDomains.where({ host }, (p) => (x) =>
33
33
  x.websiteChannelDomains
@@ -37,6 +37,10 @@ export default class WebSiteChannelService
37
37
 
38
38
  const domains = domainList.map((x) => x.domainID);
39
39
 
40
+ if (domains.length === 0 && mailboxes.length === 0) {
41
+ domains.push(0);
42
+ }
43
+
40
44
  return {
41
45
  mailboxes: mailboxes.length ? mailboxes : void 0,
42
46
  domains