···18841884 // if the last typing status received is more than 6 seconds ago. In this case, we set the last
18851885 // typing time to 0 and redraw.
18861886 pub fn checkTypingStatus(self: *Client, ctx: *vxfw.EventContext) void {
18871887+ // We only care about typing tags if we have the message-tags cap
18881888+ if (!self.caps.@"message-tags") return;
18871889 const now: u32 = @intCast(std.time.timestamp());
18881890 for (self.channels.items) |channel| {
18891889- if (channel.typing_last_active > 0 and
18901890- channel.typing_last_active + 6 >= now) continue;
18911891- channel.typing_last_active = 0;
18921892- ctx.redraw = true;
18911891+ // If the last_active is set, and it is more than 6 seconds ago, we will redraw
18921892+ if (channel.typing_last_active != 0 and channel.typing_last_active + 6 < now) {
18931893+ channel.typing_last_active = 0;
18941894+ ctx.redraw = true;
18951895+ }
18931896 }
18941897 }
18951898