Page MenuHomePhabricator

D5312.id18735.diff
No OneTemporary

D5312.id18735.diff

diff --git a/keyserver/src/responders/user-responders.js b/keyserver/src/responders/user-responders.js
--- a/keyserver/src/responders/user-responders.js
+++ b/keyserver/src/responders/user-responders.js
@@ -4,6 +4,7 @@
import t from 'tcomb';
import bcrypt from 'twin-bcrypt';
+import { policyTypes } from 'lib/facts/policies.js';
import { hasMinCodeVersion } from 'lib/shared/version-utils';
import type {
ResetPasswordRequest,
@@ -63,6 +64,7 @@
updateUserSettings,
} from '../updaters/account-updaters';
import { userSubscriptionUpdater } from '../updaters/user-subscription-updaters';
+import { viewerAcknowledgmentUpdater } from '../updaters/viewer-acknowledgment-updater.js';
import { validateInput } from '../utils/validation-utils';
import {
entryQueryInputValidator,
@@ -258,6 +260,17 @@
}
const messageSelectionCriteria = { threadCursors, joinedThreads: true };
+ let acknowledgmentUpdate = undefined;
+ if (
+ input.source === logInActionSources.logInFromNativeForm ||
+ (!hasMinCodeVersion(viewer.platformDetails, 99999) && !input.source)
+ ) {
+ acknowledgmentUpdate = viewerAcknowledgmentUpdater(
+ viewer,
+ policyTypes.tosAndPrivacyPolicy,
+ );
+ }
+
const [
threadsResult,
messagesResult,
@@ -270,6 +283,7 @@
calendarQuery ? fetchEntryInfos(viewer, [calendarQuery]) : undefined,
fetchKnownUserInfos(viewer),
fetchLoggedInUserInfo(viewer),
+ acknowledgmentUpdate,
]);
const rawEntryInfos = entriesResult ? entriesResult.rawEntryInfos : null;

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 10:41 PM (21 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2679081
Default Alt Text
D5312.id18735.diff (1 KB)

Event Timeline