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 @@ -1370,9 +1370,8 @@ 'all threads should have a default role', ); const defaultRole = threadInfo.roles[defaultRoleID]; - const defaultRolePermissions = defaultRole.minimallyEncoded - ? decodeMinimallyEncodedRoleInfo(defaultRole).permissions - : defaultRole.permissions; + const defaultRolePermissions = + decodeMinimallyEncodedRoleInfo(defaultRole).permissions; return !!defaultRolePermissions[threadPermissions.VOICED]; } @@ -1656,12 +1655,10 @@ Object.keys(threadInfo.roles).forEach(roleID => { const roleName = threadInfo.roles[roleID].name; - const rolePermissions = threadInfo.minimallyEncoded - ? Object.keys( - decodeMinimallyEncodedRoleInfo(threadInfo.roles[roleID]) - .permissions, - ) - : Object.keys(threadInfo.roles[roleID].permissions); + const rolePermissions = Object.keys( + decodeMinimallyEncodedRoleInfo(threadInfo.roles[roleID]).permissions, + ); + const setOfUserSurfacedPermissions = new Set(); rolePermissions.forEach(rolePermission => { diff --git a/lib/utils/drawer-utils.react.js b/lib/utils/drawer-utils.react.js --- a/lib/utils/drawer-utils.react.js +++ b/lib/utils/drawer-utils.react.js @@ -90,12 +90,7 @@ if (numberOfOccurrences) { name = `${name} (${numberOfOccurrences.toString()})`; } - // Branching to appease `flow`. - if (chat.minimallyEncoded) { - result.push({ ...chat, uiName: name }); - } else { - result.push({ ...chat, uiName: name }); - } + result.push({ ...chat, uiName: name }); } return result; }, [communities]); diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js --- a/native/input/input-state-container.react.js +++ b/native/input/input-state-container.react.js @@ -520,16 +520,10 @@ time: Date.now(), }; - // Branching to appease `flow`. - const newThreadInfo = threadInfo.minimallyEncoded - ? { - ...threadInfo, - id: newThreadID, - } - : { - ...threadInfo, - id: newThreadID, - }; + const newThreadInfo = { + ...threadInfo, + id: newThreadID, + }; void this.props.dispatchActionPromise( sendTextMessageActionTypes, diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js --- a/web/input/input-state-container.react.js +++ b/web/input/input-state-container.react.js @@ -1315,16 +1315,10 @@ time: Date.now(), }; - // Branching to appease `flow`. - const newThreadInfo = threadInfo.minimallyEncoded - ? { - ...threadInfo, - id: newThreadID, - } - : { - ...threadInfo, - id: newThreadID, - }; + const newThreadInfo = { + ...threadInfo, + id: newThreadID, + }; void this.props.dispatchActionPromise( sendTextMessageActionTypes, this.sendTextMessageAction(