Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32210832
D11317.1765133188.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D11317.1765133188.diff
View Options
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
@@ -963,6 +963,7 @@
roles: rawThreadInfo.roles,
currentUser: getMinimallyEncodedCurrentUser(
rawThreadInfo,
+ null,
viewerID,
userInfos,
),
@@ -998,10 +999,18 @@
function getMinimallyEncodedCurrentUser(
threadInfo: RawThreadInfo | ThreadInfo,
+ communityThreadInfo: ?(RawThreadInfo | ThreadInfo),
viewerID: ?string,
userInfos: UserInfos,
): ThreadCurrentUserInfo {
- if (!clientThreadFrozenDueToBlock(threadInfo, viewerID, userInfos)) {
+ if (
+ !clientThreadFrozenDueToBlock(
+ threadInfo,
+ communityThreadInfo,
+ viewerID,
+ userInfos,
+ )
+ ) {
return threadInfo.currentUser;
}
const decodedPermissions = threadPermissionsFromBitmaskHex(
@@ -1060,6 +1069,7 @@
function clientThreadFrozenDueToBlock(
threadInfo: RawThreadInfo | ThreadInfo,
+ communityThreadInfo: ?(RawThreadInfo | ThreadInfo),
viewerID: ?string,
userInfos: UserInfos,
): boolean {
@@ -1340,6 +1350,7 @@
...updatedThread,
currentUser: getMinimallyEncodedCurrentUser(
updatedThread,
+ null,
viewerID,
userInfos,
),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 6:46 PM (8 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5845500
Default Alt Text
D11317.1765133188.diff (1 KB)
Attached To
Mode
D11317: [lib] Update `clientThreadFrozenDueToBlock` and `getMinimallyEncodedCurrentUser` signatures to include `communityThreadInfo`
Attached
Detach File
Event Timeline
Log In to Comment