diff --git a/src/compose/ComposeBox.js b/src/compose/ComposeBox.js index 97132316a4d..40e8416e394 100644 --- a/src/compose/ComposeBox.js +++ b/src/compose/ComposeBox.js @@ -431,6 +431,12 @@ const ComposeBox: React$AbstractComponent = forwardRef( return; } + if (topicSelectionAllowed && topicInputState.value === '' && message.type === 'stream') { + // Later, this won't be necessary in the case of composing a new + // message. See TODO above about re-narrowing to `message`'s + // conversation. + setTopicInputValue(message.subject); + } const quoteAndReplyText = getQuoteAndReplyText({ message, rawContent, @@ -453,6 +459,9 @@ const ComposeBox: React$AbstractComponent = forwardRef( setMessageInputValue, zulipFeatureLevel, _, + topicSelectionAllowed, + topicInputState.value, + setTopicInputValue, ], ); useImperativeHandle(ref, () => ({ doQuoteAndReply }), [doQuoteAndReply]);