···1884 // if the last typing status received is more than 6 seconds ago. In this case, we set the last
1885 // typing time to 0 and redraw.
1886 pub fn checkTypingStatus(self: *Client, ctx: *vxfw.EventContext) void {
001887 const now: u32 = @intCast(std.time.timestamp());
1888 for (self.channels.items) |channel| {
1889- if (channel.typing_last_active > 0 and
1890- channel.typing_last_active + 6 >= now) continue;
1891- channel.typing_last_active = 0;
1892- ctx.redraw = true;
01893 }
1894 }
1895
···1884 // if the last typing status received is more than 6 seconds ago. In this case, we set the last
1885 // typing time to 0 and redraw.
1886 pub fn checkTypingStatus(self: *Client, ctx: *vxfw.EventContext) void {
1887+ // We only care about typing tags if we have the message-tags cap
1888+ if (!self.caps.@"message-tags") return;
1889 const now: u32 = @intCast(std.time.timestamp());
1890 for (self.channels.items) |channel| {
1891+ // If the last_active is set, and it is more than 6 seconds ago, we will redraw
1892+ if (channel.typing_last_active != 0 and channel.typing_last_active + 6 < now) {
1893+ channel.typing_last_active = 0;
1894+ ctx.redraw = true;
1895+ }
1896 }
1897 }
1898