@@ -18,6 +18,7 @@ import { AsyncCommandResult, KnownDataStatusCode } from '../../request';
18
18
import * as NetSocket from '../../network/socket' ;
19
19
import { GetConfRes } from '../../packet/booking' ;
20
20
import { CheckinRes } from '../../packet/checkin' ;
21
+ import { Long } from 'bson' ;
21
22
22
23
/**
23
24
* Create loco stream by performing booking and checkin.
@@ -33,7 +34,7 @@ export class TalkSessionFactory implements SessionFactory {
33
34
return getBookingData ( bookingStream , config ) ;
34
35
}
35
36
36
- async getCheckin ( config : CheckinConfig ) : AsyncCommandResult < CheckinRes > {
37
+ async getCheckin ( userId : Long , config : CheckinConfig ) : AsyncCommandResult < CheckinRes > {
37
38
let checkinStream ;
38
39
const checkinCrypto = await newCryptoStore ( config . locoPEMPublicKey ) ;
39
40
try {
@@ -56,11 +57,11 @@ export class TalkSessionFactory implements SessionFactory {
56
57
} ) , checkinCrypto ) ;
57
58
}
58
59
59
- return getCheckinData ( checkinStream , config ) ;
60
+ return getCheckinData ( checkinStream , config , userId ) ;
60
61
}
61
62
62
- async connect ( config : SessionConfig ) : AsyncCommandResult < ConnectionSession > {
63
- const checkinRes = await this . getCheckin ( config ) ;
63
+ async connect ( userId : Long , config : SessionConfig ) : AsyncCommandResult < ConnectionSession > {
64
+ const checkinRes = await this . getCheckin ( userId , config ) ;
64
65
if ( ! checkinRes . success ) return checkinRes ;
65
66
66
67
const locoStream = new LocoSecureLayer ( await NetSocket . createTCPSocket ( {
0 commit comments