diff --git a/src/matrix.zig b/src/matrix.zig index 0967d6e..2e54aea 100644 --- a/src/matrix.zig +++ b/src/matrix.zig @@ -316,7 +316,11 @@ pub fn setTyping(alloc: std.mem.Allocator, io: Io, token: []const u8, user_id: [ else alloc.dupe(u8, "{\"typing\":false}") catch return; defer alloc.free(body); - _ = httpRaw(alloc, io, "PUT", url, token, "application/json", body) catch null; + if (httpRaw(alloc, io, "PUT", url, token, "application/json", body)) |resp| { + alloc.free(resp); + } else |e| { + std.debug.print("matrix_harness: setTyping failed: {s}\n", .{@errorName(e)}); + } } pub fn sendText(alloc: std.mem.Allocator, io: Io, token: []const u8, room: []const u8, body: []const u8) ![]u8 {