Page MenuHomePhabricator

D12227.diff
No OneTemporary

D12227.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, Nov 24, 10:54 PM (21 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2576775
Default Alt Text
D12227.diff (989 B)

Event Timeline