diff --git a/src/utils/__tests__/narrow-test.js b/src/utils/__tests__/narrow-test.js index 72a92152c7e..87e6ee62297 100644 --- a/src/utils/__tests__/narrow-test.js +++ b/src/utils/__tests__/narrow-test.js @@ -322,15 +322,6 @@ describe('getNarrowForReply', () => { expect(actualNarrow).toEqual(expectedNarrow); }); - test('if recipient of a message is string, returns a stream narrow', () => { - const message = eg.streamMessage({ subject: '' }); - const expectedNarrow = streamNarrow(eg.stream.name); - - const actualNarrow = getNarrowForReply(message, ownEmail); - - expect(actualNarrow).toEqual(expectedNarrow); - }); - test('if recipient is a string and there is a subject returns a topic narrow', () => { const message = eg.streamMessage(); const expectedNarrow = topicNarrow(eg.stream.name, message.subject); diff --git a/src/utils/narrow.js b/src/utils/narrow.js index 61b0fcf5257..f1497fe14fe 100644 --- a/src/utils/narrow.js +++ b/src/utils/narrow.js @@ -324,9 +324,5 @@ export const getNarrowForReply = (message: Message | Outbox, ownEmail: string) = } } - if (message.subject && message.subject.length) { - return topicNarrow(message.display_recipient, message.subject); - } - - return streamNarrow(message.display_recipient); + return topicNarrow(message.display_recipient, message.subject); };