Update WebSocketModule.java

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 https://github.com/facebook/react-native/pull/15046

Differential Revision: D5451398

Pulled By: javache

fbshipit-source-id: b8c6c7b0fb50ca9558e92d3f63a088e343791b7f
This commit is contained in:
sm2017 2017-07-19 02:20:10 -07:00 committed by Facebook Github Bot
parent c7a596534f
commit 7e29b1fc77

View File

@ -159,7 +159,7 @@ public class WebSocketModule extends ReactContextBaseJavaModule {
@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);