Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3357566
D12227.id40746.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
989 B
Referenced Files
None
Subscribers
None
D12227.id40746.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 12:17 AM (21 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2576775
Default Alt Text
D12227.id40746.diff (989 B)
Attached To
Mode
D12227: [keyserver] Check if we should create GENESIS
Attached
Detach File
Event Timeline
Log In to Comment