mirror of
https://github.com/signalapp/libsignal.git
synced 2026-04-26 01:35:22 +02:00
Bridge registration session state as handle
This commit is contained in:
@@ -20,6 +20,8 @@ import {
|
||||
Environment,
|
||||
Net,
|
||||
newNativeHandle,
|
||||
RegistrationService,
|
||||
RegistrationSessionState,
|
||||
SIGNAL_TLS_PROXY_SCHEME,
|
||||
TokioAsyncContext,
|
||||
UnauthenticatedChatConnection,
|
||||
@@ -879,16 +881,18 @@ describe('cdsi lookup', () => {
|
||||
|
||||
describe('registration client', () => {
|
||||
describe('registration session conversion', () => {
|
||||
const expectedSession: Native.RegistrationSession = {
|
||||
const expectedSession: RegistrationSessionState = {
|
||||
allowedToRequestCode: true,
|
||||
verified: true,
|
||||
nextCallSecs: 123,
|
||||
nextSmsSecs: 456,
|
||||
nextVerificationAttemptSecs: 789,
|
||||
requestedInformation: ['pushChallenge'],
|
||||
requestedInformation: new Set(['pushChallenge']),
|
||||
};
|
||||
|
||||
const convertedSession = Native.TESTING_RegistrationSessionInfoConvert();
|
||||
const convertedSession = RegistrationService._convertNativeSessionState(
|
||||
newNativeHandle(Native.TESTING_RegistrationSessionInfoConvert())
|
||||
);
|
||||
expect(convertedSession).to.deep.equal(expectedSession);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user