Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3325895
D13853.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13853.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13853: [keyserver] add know_of permission if viewer.isScriptViewer
Attached
Detach File
Event Timeline
Log In to Comment