typing-events: Use valid channel ID to get conversation typists.

(cherry picked from commit ae66bf287b)
This commit is contained in:
Lauryn Menard
2025-03-27 16:29:36 +01:00
committed by Tim Abbott
parent 3f37ee7bc7
commit 2e6eeabac6

View File

@@ -76,10 +76,10 @@ type TypingMessageEditEvent = z.output<typeof typing_edit_message_event_schema>;
function get_users_typing_for_narrow(): number[] { function get_users_typing_for_narrow(): number[] {
if (narrow_state.narrowed_by_topic_reply()) { if (narrow_state.narrowed_by_topic_reply()) {
const current_stream_id = narrow_state.stream_id(); const current_stream_id = narrow_state.stream_id(narrow_state.filter(), true);
const current_topic = narrow_state.topic(); const current_topic = narrow_state.topic();
if (current_stream_id === undefined) { if (current_stream_id === undefined) {
// narrowed to a stream which doesn't exist. // Narrowed to a channel which doesn't exist.
return []; return [];
} }
assert(current_topic !== undefined); assert(current_topic !== undefined);