From d300b8ce6fb4844dca62663cfa8e1eb76ea34a26 Mon Sep 17 00:00:00 2001 From: rainfall Date: Sun, 3 Nov 2024 14:46:25 -0500 Subject: [PATCH] minor fixes' --- src/discord.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/discord.zig b/src/discord.zig index a272fb9..8752c03 100644 --- a/src/discord.zig +++ b/src/discord.zig @@ -326,8 +326,9 @@ inline fn _connect_ws(allocator: mem.Allocator, url: []const u8) !ws.Client { }); // maybe change this to a buffer + const url_host = try std.Uri.parse(url); var buf: [0x100]u8 = undefined; - const host = try std.fmt.bufPrint(&buf, "host: {s}", .{url}); + const host = try std.fmt.bufPrint(&buf, "host: {s}", .{url_host.host.?.percent_encoded}); conn.handshake("/?v=10&encoding=json&compress=zlib-stream", .{ .timeout_ms = 1000,