Skip to content

Commit

Permalink
Update WebSocketModule.java
Browse files Browse the repository at this point in the history
Summary:
Convert to base64 not utf8

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes #15046

Differential Revision: D5451398

Pulled By: javache

fbshipit-source-id: b8c6c7b0fb50ca9558e92d3f63a088e343791b7f
  • Loading branch information
sm2017 authored and ide committed Jul 26, 2017
1 parent 9194b9d commit 048a5fd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void onMessage(WebSocket webSocket, String text) {

@Override
public void onMessage(WebSocket webSocket, ByteString bytes) {
String text = bytes.utf8();
String text = bytes.base64();
WritableMap params = Arguments.createMap();
params.putInt("id", id);
params.putString("data", text);
Expand Down

0 comments on commit 048a5fd

Please sign in to comment.