Page MenuHomePhabricator

D10483.diff
No OneTemporary

D10483.diff

diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js
--- a/keyserver/src/push/send.js
+++ b/keyserver/src/push/send.js
@@ -21,7 +21,6 @@
} from 'lib/shared/message-utils.js';
import { messageSpecs } from 'lib/shared/messages/message-specs.js';
import { notifTextsForMessageInfo } from 'lib/shared/notif-utils.js';
-import { isStaff } from 'lib/shared/staff-utils.js';
import {
rawThreadInfoFromServerThreadInfo,
threadInfoFromRawThreadInfo,
@@ -39,7 +38,6 @@
import type { ServerThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
import { updateTypes } from 'lib/types/update-types-enum.js';
import { type GlobalUserInfo } from 'lib/types/user-types.js';
-import { isDev } from 'lib/utils/dev-utils.js';
import { values } from 'lib/utils/objects.js';
import { tID, tPlatformDetails, tShape } from 'lib/utils/validation-utils.js';
@@ -467,16 +465,12 @@
const preparePromise: Promise<$ReadOnlyArray<PreparePushResult>> =
(async () => {
- const targetedNotifications = await prepareWNSNotification(
- userID,
- devices,
- {
- notifTexts,
- threadID: threadInfo.id,
- unreadCount,
- platformDetails,
- },
- );
+ const targetedNotifications = await prepareWNSNotification(devices, {
+ notifTexts,
+ threadID: threadInfo.id,
+ unreadCount,
+ platformDetails,
+ });
return targetedNotifications.map(notification => ({
notification,
@@ -1277,7 +1271,6 @@
platformDetails: tPlatformDetails,
});
async function prepareWNSNotification(
- userID: string,
devices: $ReadOnlyArray<NotificationTargetDevice>,
inputData: WNSNotifInputData,
): Promise<$ReadOnlyArray<TargetedWNSNotification>> {
@@ -1301,12 +1294,9 @@
console.warn('WNS notification exceeds size limit');
}
- const isStaffOrDev = isStaff(userID) || isDev;
- const shouldBeEncrypted =
- isStaffOrDev &&
- hasMinCodeVersion(inputData.platformDetails, {
- majorDesktop: 10,
- });
+ const shouldBeEncrypted = hasMinCodeVersion(inputData.platformDetails, {
+ majorDesktop: 10,
+ });
if (!shouldBeEncrypted) {
return devices.map(({ deviceToken }) => ({
diff --git a/keyserver/src/session/cookies.js b/keyserver/src/session/cookies.js
--- a/keyserver/src/session/cookies.js
+++ b/keyserver/src/session/cookies.js
@@ -5,7 +5,6 @@
import invariant from 'invariant';
import url from 'url';
-import { isStaff } from 'lib/shared/staff-utils.js';
import { hasMinCodeVersion } from 'lib/shared/version-utils.js';
import type { SignedIdentityKeysBlob } from 'lib/types/crypto-types.js';
import {
@@ -24,7 +23,6 @@
import type { SIWESocialProof } from 'lib/types/siwe-types.js';
import type { InitialClientSocketMessage } from 'lib/types/socket-types.js';
import type { UserInfo } from 'lib/types/user-types.js';
-import { isDev } from 'lib/utils/dev-utils.js';
import { ignorePromiseRejections } from 'lib/utils/promises.js';
import {
@@ -750,8 +748,6 @@
isDeviceType(viewer.platformDetails?.platform) &&
hasMinCodeVersion(viewer.platformDetails, { native: 222 });
- const isStaffOrDev = isStaff(viewer.userID) || isDev;
-
const isWebSupportingE2ENotifs =
viewer.platformDetails?.platform === 'web' &&
hasMinCodeVersion(viewer.platformDetails, { web: 43 });
@@ -761,7 +757,6 @@
hasMinCodeVersion(viewer.platformDetails, { web: 43, majorDesktop: 9 });
const isWindowsSupportingE2ENotifs =
- isStaffOrDev &&
viewer.platformDetails?.platform === 'windows' &&
hasMinCodeVersion(viewer.platformDetails, {
majorDesktop: 10,

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 3, 12:19 PM (21 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611644
Default Alt Text
D10483.diff (3 KB)

Event Timeline