Page MenuHomePhabricator

D5664.diff
No OneTemporary

D5664.diff

diff --git a/keyserver/src/creators/account-creator.js b/keyserver/src/creators/account-creator.js
--- a/keyserver/src/creators/account-creator.js
+++ b/keyserver/src/creators/account-creator.js
@@ -6,6 +6,7 @@
import ashoat from 'lib/facts/ashoat';
import bots from 'lib/facts/bots';
import genesis from 'lib/facts/genesis';
+import { policyTypes } from 'lib/facts/policies.js';
import {
validUsernameRegex,
oldValidUsernameRegex,
@@ -33,6 +34,7 @@
import { createScriptViewer } from '../session/scripts';
import type { Viewer } from '../session/viewer';
import { updateThread } from '../updaters/thread-updaters';
+import { viewerAcknowledgmentUpdater } from '../updaters/viewer-acknowledgment-updater.js';
import createIDs from './id-creator';
import createMessages from './message-creator';
import {
@@ -108,18 +110,22 @@
dbQuery(newUserQuery),
]);
viewer.setNewCookie(userViewerData);
+
if (calendarQuery) {
await setNewSession(viewer, calendarQuery, 0);
}
- await updateThread(
- createScriptViewer(ashoat.id),
- {
- threadID: genesis.id,
- changes: { newMemberIDs: [id] },
- },
- { forceAddMembers: true, silenceMessages: true, ignorePermissions: true },
- );
+ await Promise.all([
+ updateThread(
+ createScriptViewer(ashoat.id),
+ {
+ threadID: genesis.id,
+ changes: { newMemberIDs: [id] },
+ },
+ { forceAddMembers: true, silenceMessages: true, ignorePermissions: true },
+ ),
+ viewerAcknowledgmentUpdater(viewer, policyTypes.tosAndPrivacyPolicy),
+ ]);
const [privateThreadResult, ashoatThreadResult] = await Promise.all([
createPrivateThread(viewer, request.username),

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 1:34 PM (16 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2678139
Default Alt Text
D5664.diff (1 KB)

Event Timeline