File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,12 +30,6 @@ import ChatHandler from './helpers/ChatHandler';
3030import { combineEpics } from 'redux-observable' ;
3131import createDetectVisibilityObservable from './helpers/createDetectPageVisibilityObservable' ;
3232
33- // let wsUrl = `${window.location.origin.replace('http', 'ws')}/api/ws/messages/all`;
34- // if (Capacitor.isNativePlatform()) {
35- // // wsUrl = 'wss://www.leapchat.org/api/ws/messages/all'
36- // wsUrl = 'ws://10.0.2.2:8080/api/ws/messages/all'
37- // }
38-
3933import { authUrl , wsUrl } from './helpers/urls' ;
4034
4135export const chatHandler = new ChatHandler ( wsUrl ) ;
@@ -130,6 +124,12 @@ function getAuthRequestSettings({ mID }) {
130124 return settings ;
131125}
132126
127+ // Helper for parsing response from Go API
128+ //
129+ // From https://stackoverflow.com/a/36183085
130+ const b64toBlob = ( base64 , type = 'application/octet-stream' ) =>
131+ fetch ( `data:${ type } ;base64,${ base64 } ` ) . then ( res => res . blob ( ) ) ;
132+
133133const connectionAlertTtlSeconds = 4 ;
134134
135135const initConnectionEpic = ( action$ ) =>
You can’t perform that action at this time.
0 commit comments