Page MenuHomePhabricator

D13853.diff
No OneTemporary

D13853.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
@@ -279,6 +279,7 @@
serverResult: FetchServerThreadInfosResult,
): FetchThreadInfosResult {
const viewerID = viewer.id;
+ const addKnowOfPermission = viewer.isScriptViewer;
const codeVersionBelow209 = !hasMinCodeVersion(viewer.platformDetails, {
native: 209,
});
@@ -345,6 +346,7 @@
manageFarcasterChannelTagsPermissionUnsupported,
stripMemberPermissions: stripMemberPermissions,
canDisplayFarcasterThreadAvatars,
+ addKnowOfPermission,
},
);
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
@@ -762,6 +762,7 @@
+filterManageFarcasterChannelTagsPermission?: boolean,
+stripMemberPermissions?: boolean,
+canDisplayFarcasterThreadAvatars?: boolean,
+ +addKnowOfPermission?: boolean,
};
function rawThreadInfoFromServerThreadInfo(
@@ -786,6 +787,7 @@
const stripMemberPermissions = options?.stripMemberPermissions;
const canDisplayFarcasterThreadAvatars =
options?.canDisplayFarcasterThreadAvatars;
+ const addKnowOfPermission = options?.addKnowOfPermission;
const filterThreadPermissions = (
innerThreadPermissions: ThreadPermissionsInfo,
@@ -803,6 +805,15 @@
},
};
}
+ if (addKnowOfPermission) {
+ innerThreadPermissions = {
+ ...innerThreadPermissions,
+ [threadPermissions.KNOW_OF]: {
+ value: true,
+ source: serverThreadInfo.id,
+ },
+ };
+ }
return _omitBy(
(v, k) =>
(filterThreadEditAvatarPermission &&

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 21, 6:56 AM (2 h, 56 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2554451
Default Alt Text
D13853.diff (1 KB)

Event Timeline