| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2025-05-12 14:40:58 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2025-05-12 14:40:58 UTC |
| parent | ce7cbeff64729eb3efe6c4ebc30b83519eb109ff |
| snikket/Client.hx | +1 | -1 |
diff --git a/snikket/Client.hx b/snikket/Client.hx index 2ec2638..a04c24a 100644 --- a/snikket/Client.hx +++ b/snikket/Client.hx @@ -774,7 +774,7 @@ class Client extends EventEmitter { if (slot == null) { prepareAttachmentFor(source, services.slice(1), hashes, callback); } else { - tink.http.Client.fetch(slot.put, { method: PUT, headers: slot.putHeaders.concat([new tink.http.Header.HeaderField("Content-Length", source.size)]), body: tink.io.Source.RealSourceTools.idealize(source.tinkSource(), (e) -> throw e) }).all() + tink.http.Client.fetch(slot.put, { method: PUT, headers: slot.putHeaders.concat([new tink.http.Header.HeaderField("Content-Length", source.size)]), body: tink.io.Source.RealSourceTools.idealize(source.tinkSource(), (e) -> { trace("WUT", e); throw e; }) }).all() .handle((o) -> switch o { case Success(res) if (res.header.statusCode == 201): callback(new ChatAttachment(source.name, source.type, source.size, [slot.get], hashes));