Page MenuHomePhabricator

D12294.id40903.diff
No OneTemporary

D12294.id40903.diff

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
@@ -860,21 +860,15 @@
return encodedUpdatedPermissions;
}
-type ThreadIsWithBlockedUserOnlyOptions = {
- +checkOnlyViewerBlock: boolean,
- +skipMemberAdminRoleCheck: boolean,
-};
-
function threadIsWithBlockedUserOnly(
threadInfo: LegacyRawThreadInfo | RawThreadInfo,
viewerID: ?string,
userInfos: UserInfos,
- options: ThreadIsWithBlockedUserOnlyOptions,
+ checkOnlyViewerBlock: boolean,
): boolean {
- const { checkOnlyViewerBlock, skipMemberAdminRoleCheck } = options;
if (
threadOrParentThreadIsGroupChat(threadInfo) ||
- (!skipMemberAdminRoleCheck && threadOrParentThreadHasAdminRole(threadInfo))
+ threadOrParentThreadHasAdminRole(threadInfo)
) {
return false;
}
@@ -932,12 +926,7 @@
viewerID: ?string,
userInfos: UserInfos,
): boolean {
- const options: ThreadIsWithBlockedUserOnlyOptions = {
- checkOnlyViewerBlock: false,
- skipMemberAdminRoleCheck: false,
- };
-
- return threadIsWithBlockedUserOnly(threadInfo, viewerID, userInfos, options);
+ return threadIsWithBlockedUserOnly(threadInfo, viewerID, userInfos, false);
}
function useThreadFrozenDueToViewerBlock(

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 12:04 PM (21 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2575505
Default Alt Text
D12294.id40903.diff (1 KB)

Event Timeline