braidjs icon indicating copy to clipboard operation
braidjs copied to clipboard

Make Braidify work with binary payloads

Open toomim opened this issue 2 years ago • 1 comments

@josephg mentioned that he tested his diamond-types on braid.org/test-a-server, and ran into an issue that test-a-server didn't support binary payloads. I don't think I've tested it with binary, and there are probably places where I'm assuming a string.

toomim avatar Mar 30 '22 07:03 toomim

I've looked into this. The code in braidify-client.js parses subscriptions using string regular expressions and string matches, which will need to be converted to ArrayBuffer operations. Fixing braidify-server should be simpler; we just need to change the code that writes a body or a patch to work for ArrayBuffers instead of assuming strings.

toomim avatar Apr 08 '22 22:04 toomim