Page MenuHomePhabricator

D12227.id40743.diff
No OneTemporary

D12227.id40743.diff

diff --git a/keyserver/src/database/setup-db.js b/keyserver/src/database/setup-db.js
--- a/keyserver/src/database/setup-db.js
+++ b/keyserver/src/database/setup-db.js
@@ -16,7 +16,11 @@
} from '../database/migration-config.js';
import { createScriptViewer } from '../session/scripts.js';
import { ensureUserCredentials } from '../user/checks.js';
-import { thisKeyserverAdmin, saveIdentityInfo } from '../user/identity.js';
+import {
+ thisKeyserverAdmin,
+ saveIdentityInfo,
+ isAuthoritativeKeyserver,
+} from '../user/identity.js';
import { verifyUserLoggedInWithoutDB } from '../user/login.js';
import { createPickledOlmAccount } from '../utils/olm-utils.js';
@@ -468,6 +472,12 @@
const createThreadOptions = { forceAddMembers: true };
async function createThreads() {
+ const isAuthoritative = await isAuthoritativeKeyserver();
+
+ if (!isAuthoritative) {
+ return;
+ }
+
const insertIDsPromise = dbQuery(SQL`
INSERT INTO ids (id, table_name)
VALUES

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 29, 10:46 AM (7 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2731862
Default Alt Text
D12227.id40743.diff (989 B)

Event Timeline