Page MenuHomePhabricator

D12292.id41360.diff
No OneTemporary

D12292.id41360.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
@@ -890,7 +890,7 @@
};
function threadIsWithBlockedUserOnly(
- threadInfo: LegacyRawThreadInfo | RawThreadInfo | ThreadInfo,
+ threadInfo: LegacyRawThreadInfo | RawThreadInfo,
viewerID: ?string,
userInfos: UserInfos,
options: ThreadIsWithBlockedUserOnlyOptions,
@@ -952,7 +952,7 @@
}
function innerThreadFrozenDueToBlock(
- threadInfo: LegacyRawThreadInfo | RawThreadInfo | ThreadInfo,
+ threadInfo: LegacyRawThreadInfo | RawThreadInfo,
viewerID: ?string,
userInfos: UserInfos,
skipMemberAdminRoleCheck: boolean,
@@ -966,7 +966,7 @@
}
function threadFrozenDueToBlock(
- threadInfo: LegacyRawThreadInfo | RawThreadInfo | ThreadInfo,
+ threadInfo: LegacyRawThreadInfo | RawThreadInfo,
viewerID: ?string,
userInfos: UserInfos,
): boolean {
@@ -1016,17 +1016,9 @@
// Since we don't have access to all of the ancestor ThreadInfos, we approximate
// "parent admin" as anybody with CHANGE_ROLE permissions.
function memberHasAdminPowers(
- memberInfo:
- | RelativeMemberInfo
- | LegacyMemberInfo
- | MemberInfo
- | ServerMemberInfo,
+ memberInfo: LegacyMemberInfo | MemberInfo | ServerMemberInfo,
): boolean {
if (memberInfo.minimallyEncoded) {
- invariant(
- memberInfo.permissions,
- 'memberInfo must have permissions field in memberHasAdminPowers',
- );
return hasPermission(memberInfo.permissions, threadPermissions.CHANGE_ROLE);
}
return !!memberInfo.permissions[threadPermissions.CHANGE_ROLE]?.value;
@@ -1075,7 +1067,7 @@
}
function threadOrParentThreadHasAdminRole(
- threadInfo: LegacyRawThreadInfo | RawThreadInfo | ThreadInfo,
+ threadInfo: LegacyRawThreadInfo | RawThreadInfo,
) {
return (
threadMembersWithoutAddedAdmin(threadInfo).filter(member =>

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 1:46 AM (21 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2592361
Default Alt Text
D12292.id41360.diff (1 KB)

Event Timeline