Page MenuHomePhabricator

D8007.diff
No OneTemporary

D8007.diff

diff --git a/keyserver/src/fetchers/thread-fetchers.js b/keyserver/src/fetchers/thread-fetchers.js
--- a/keyserver/src/fetchers/thread-fetchers.js
+++ b/keyserver/src/fetchers/thread-fetchers.js
@@ -196,6 +196,9 @@
const codeVersionBelow213 = !hasMinCodeVersion(viewer.platformDetails, {
native: 213,
});
+ const codeVersionBelow221 = !hasMinCodeVersion(viewer.platformDetails, {
+ native: 221,
+ });
const threadInfos = {};
for (const threadID in serverResult.threadInfos) {
@@ -211,6 +214,7 @@
filterDetailedThreadEditPermissions: codeVersionBelow104,
filterThreadEditAvatarPermission: codeVersionBelow213,
excludePinInfo: codeVersionBelow209,
+ filterManageInviteLinksPermission: codeVersionBelow221,
},
);
if (threadInfo) {
diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js
--- a/lib/shared/thread-utils.js
+++ b/lib/shared/thread-utils.js
@@ -708,6 +708,7 @@
+filterDetailedThreadEditPermissions?: boolean,
+filterThreadEditAvatarPermission?: boolean,
+excludePinInfo?: boolean,
+ +filterManageInviteLinksPermission?: boolean,
};
function rawThreadInfoFromServerThreadInfo(
serverThreadInfo: ServerThreadInfo,
@@ -723,6 +724,8 @@
const filterThreadEditAvatarPermission =
options?.filterThreadEditAvatarPermission;
const excludePinInfo = options?.excludePinInfo;
+ const filterManageInviteLinksPermission =
+ options?.filterManageInviteLinksPermission;
const filterThreadPermissions = _omitBy(
(v, k) =>
@@ -742,7 +745,9 @@
threadPermissions.MANAGE_PINS,
threadPermissionPropagationPrefixes.DESCENDANT +
threadPermissions.MANAGE_PINS,
- ].includes(k)),
+ ].includes(k)) ||
+ (filterManageInviteLinksPermission &&
+ [threadPermissions.MANAGE_INVITE_LINKS].includes(k)),
);
const members = [];

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 4:50 PM (19 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2571625
Default Alt Text
D8007.diff (1 KB)

Event Timeline