Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3572038
D12227.id.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.id.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
Sun, Dec 29, 10:46 AM (8 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2731862
Default Alt Text
D12227.id.diff (989 B)
Attached To
Mode
D12227: [keyserver] Check if we should create GENESIS
Attached
Detach File
Event Timeline
Log In to Comment