commit
Move emails to new inbox
diff --git a/.dev.vars.example b/.dev.vars.example
index 78cd9c6..a23824b 100644
--- a/.dev.vars.example
+++ b/.dev.vars.example
@@ -10,4 +10,4 @@ OIDC_SCOPE=openid profile email offline_access
OIDC_POST_LOGOUT_REDIRECT_URI=
VAPID_PUBLIC_KEY=
VAPID_PRIVATE_KEY=
-VAPID_SUBJECT=mailto:[email protected]
+VAPID_SUBJECT=mailto:[email protected]
diff --git a/LICENCE.md b/LICENCE.md
index 640ddfb..07eff7b 100644
--- a/LICENCE.md
+++ b/LICENCE.md
@@ -160,7 +160,7 @@ An allowlist entry constitutes Authorisation for the scope expressly stated in t
Requests for Authorisation should be submitted to:
-**[[email protected]](mailto:[email protected])**
+**[[email protected]](mailto:[email protected])**
Clove Nytrix Doughmination Twilight may maintain Official Licensing Records identifying authorised persons, organisations, and licensing conditions.
diff --git a/lib/owners.ts b/lib/owners.ts
index 3330797..146101e 100644
--- a/lib/owners.ts
+++ b/lib/owners.ts
@@ -45,6 +45,20 @@ export async function initOwners(): Promise<void> {
const stored = (await kv().get("owners:config", "json")) as Partial<OwnersConfig> | null;
if (stored) {
cfg = normalize(stored);
+ // The domain always comes from owners.json, so changing it there migrates
+ // the stored config. Fully-qualified entries on the old domain are
+ // rewritten to bare names so they follow the new one.
+ const seedDomain = loadSeed().domain;
+ if (seedDomain && cfg.domain !== seedDomain) {
+ const oldSuffix = `@${cfg.domain}`;
+ for (const [user, entries] of Object.entries(cfg.owners)) {
+ cfg.owners[user] = Array.from(
+ new Set(entries.map((e) => (e.endsWith(oldSuffix) ? e.slice(0, -oldSuffix.length) : e))),
+ );
+ }
+ cfg.domain = seedDomain;
+ await save();
+ }
return;
}
cfg = loadSeed();
diff --git a/owners.json b/owners.json
index 9d72237..79ca440 100644
--- a/owners.json
+++ b/owners.json
@@ -1,5 +1,5 @@
{
- "domain": "doughmination.win",
+ "domain": "doughmination.gay",
"admins": ["clove"],
"catchAll": "clove",
"owners": {
diff --git a/public/login.html b/public/login.html
index 58d812d..0b9ddc5 100644
--- a/public/login.html
+++ b/public/login.html
@@ -13,7 +13,7 @@
<meta property="og:site_name" content="Inbox" />
<meta property="og:title" content="Inbox" />
<meta property="og:description" content="Clove Twilight's private mailbox." />
- <meta property="og:url" content="https://doughmination.tech" />
+ <meta property="og:url" content="https://mail.doughmination.gay" />
<meta property="og:image" content="https://m.doughmination.gay/img/avatars/favicon.png" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Inbox" />
diff --git a/public/settings.html b/public/settings.html
index f732881..d0d6436 100644
--- a/public/settings.html
+++ b/public/settings.html
@@ -33,7 +33,7 @@
<h2>Your addresses</h2>
<p class="settings-hint">
Addresses you can send as. Everyone owns their own
- <code>[email protected]</code>; extra addresses are reserved
+ <code>[email protected]</code>; extra addresses are reserved
for you by an admin below.
</p>
@@ -48,7 +48,7 @@
<p class="settings-hint">
One card per user. Expand a card to see their info, reserve or remove
extra addresses, or delete the account. Everyone always keeps their own
- <code>[email protected]</code>; unreserved mail goes to the
+ <code>[email protected]</code>; unreserved mail goes to the
catch-all owner (<span id="catchAllName" class="mono">…</span>).
</p>
diff --git a/wrangler.jsonc b/wrangler.jsonc
index e0a3392..4a7e94d 100644
--- a/wrangler.jsonc
+++ b/wrangler.jsonc
@@ -22,7 +22,7 @@
],
"vars": {
"OIDC_SCOPE": "openid profile email offline_access",
- "VAPID_SUBJECT": "mailto:[email protected]",
+ "VAPID_SUBJECT": "mailto:[email protected]",
"COOKIE_SECURE": "true",
"OIDC_ISSUER": "https://auth.doughmination.gay",
"OIDC_CLIENT_ID": "cc067f21-88ca-4927-ac7b-26d21968d2e1",