send auth payload on websocket open
This commit is contained in:
parent
87dce82c53
commit
716730fdd2
3 changed files with 24 additions and 6 deletions
|
|
@ -5,6 +5,7 @@ import { initSession, emitNewMessages, sendMessage } from '@/background/session'
|
|||
import { ipcMain, IpcMainInvokeEvent, IpcMainEvent } from "electron";
|
||||
import { initAudioIO } from "@/background/audio";
|
||||
import { ClientMessage } from "@/types";
|
||||
import { store } from "@/background/store";
|
||||
|
||||
|
||||
// Instantiate socket session with crimata-platorm.
|
||||
|
|
@ -15,7 +16,14 @@ const onSessionInit = (
|
|||
|
||||
console.log('[IPC]: init-session');
|
||||
|
||||
initSession(cid);
|
||||
const token = store.get('key');
|
||||
const crimataId = store.get('crimataId');
|
||||
|
||||
|
||||
initSession({
|
||||
token,
|
||||
crimataId
|
||||
});
|
||||
|
||||
initAudioIO();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue