-
-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve documentation of base64 function #4338
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The assertion that ArrayBuffer is a node concept is actually a lie - it exists on web, and it's what SubtleCrypto.decrypt
returns.
What is a node concept is Buffer
. AFAICT, your code is currently going via the "node" path, using Webpack's polyfill of Buffer...
So yeah, the comments are crap, but not for this reason...
(Should we be relying on the polyfill of Buffer? If we can, why do we need the verbose implementation? so many questions...)
lol, of course the |
cries I'm not sure this is the PR to fix the situation, but if we can save future folks from an expedition of sadness, then we should. I'll open some issues about the potential optimizations when I get back to this PR. (also thank you for the prompt review, and further research) |
Yeah, I'm not insisting you fix this right now. But doubling down on "ArrayBuffers are a node concept" line doesn't seem very helpful either, tbh. Maybe just abort this PR for now? |
Sorry, this will have been my comment, and I suspect having got the terms clear in my head, my fingers then wrote something else. Element web and it's joyous webpack world may well be ending up in the node code, although I'm not sure that's necessarily js-sdk's job to worry about. What was the original confusion? |
It wasn't clear which path was the "browser" path, and the ArrayBuffer comment just doesn't make sense - it's saying to check for something because we can't use |
Closing in favour of #4341 |
No description provided.