Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
941 B

/*
* https://github.com/morethanwords/tweb
* Copyright (C) 2019-2021 Eduard Kuzmenko
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*/
import type { AppInstance } from './mtproto/singleInstance';
import type { UserAuth } from './mtproto/mtproto_config';
3 years ago
import { MOUNT_CLASS_TO } from '../config/debug';
import AppStorage from './storage';
import DATABASE_SESSION from '../config/databases/session';
const sessionStorage = new AppStorage<{
dc: number,
user_auth: UserAuth,
dc1_auth_key: string,
dc2_auth_key: string,
dc3_auth_key: string,
dc4_auth_key: string,
dc5_auth_key: string,
dc1_server_salt: string,
dc2_server_salt: string,
dc3_server_salt: string,
dc4_server_salt: string,
dc5_server_salt: string,
server_time_offset: number,
xt_instance: AppInstance
}, typeof DATABASE_SESSION>(DATABASE_SESSION, 'session');
MOUNT_CLASS_TO.appStorage = sessionStorage;
export default sessionStorage;