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 @@ -1733,11 +1733,11 @@ } function patchThreadInfoToIncludeMentionedMembersOfParent( - threadInfo: ThreadInfo | MinimallyEncodedThreadInfo, - parentThreadInfo: ThreadInfo | MinimallyEncodedThreadInfo, + threadInfo: ThreadInfo, + parentThreadInfo: ThreadInfo, messageText: string, viewerID: string, -): ThreadInfo | MinimallyEncodedThreadInfo { +): ThreadInfo { const members: UserIDAndUsername[] = threadInfo.members .map(({ id, username }) => (username ? { id, username } : null)) .filter(Boolean); diff --git a/lib/utils/entity-helpers.js b/lib/utils/entity-helpers.js --- a/lib/utils/entity-helpers.js +++ b/lib/utils/entity-helpers.js @@ -93,7 +93,7 @@ function useResolvedThreadInfosObj( threadInfosObj: { +[id: string]: ThreadInfo }, options?: ?UseENSNamesOptions, -): { +[id: string]: ResolvedThreadInfo } { +): { +[id: string]: ResolvedThreadInfo | MinimallyEncodedResolvedThreadInfo } { const threadInfosArray = React.useMemo( () => values(threadInfosObj), [threadInfosObj], 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 @@ -513,16 +513,10 @@ time: Date.now(), }; - // Branching to appease `flow`. - const newThreadInfo = threadInfo.minimallyEncoded - ? { - ...threadInfo, - id: newThreadID, - } - : { - ...threadInfo, - id: newThreadID, - }; + const newThreadInfo = { + ...threadInfo, + id: newThreadID, + }; 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 @@ -1284,16 +1284,10 @@ time: Date.now(), }; - // Branching to appease `flow`. - const newThreadInfo = threadInfo.minimallyEncoded - ? { - ...threadInfo, - id: newThreadID, - } - : { - ...threadInfo, - id: newThreadID, - }; + const newThreadInfo = { + ...threadInfo, + id: newThreadID, + }; this.props.dispatchActionPromise( sendTextMessageActionTypes, this.sendTextMessageAction(