diff --git a/web/src/filter.ts b/web/src/filter.ts index 3c7d62746d..2aa39bba03 100644 --- a/web/src/filter.ts +++ b/web/src/filter.ts @@ -1626,10 +1626,8 @@ export class Filter { return new Filter(terms); } - has_topic(stream_id: number, topic: string): boolean { - return ( - this.has_operand("channel", stream_id.toString()) && this.has_operand("topic", topic) - ); + has_topic(stream_id: string, topic: string): boolean { + return this.has_operand("channel", stream_id) && this.has_operand("topic", topic); } sorted_term_types(): string[] { diff --git a/web/src/message_events.ts b/web/src/message_events.ts index 919f9428a5..920337336a 100644 --- a/web/src/message_events.ts +++ b/web/src/message_events.ts @@ -679,7 +679,7 @@ export function update_messages(events: UpdateMessageEvent[]): void { // Code further down takes care of the actual rerendering of // messages within a narrow. selection_changed_topic && - current_filter?.has_topic(old_stream_id, orig_topic) + current_filter?.has_topic(String(old_stream_id), orig_topic) ) { let new_filter = current_filter; if (new_filter && stream_changed) {