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.

18 lines
659 B

4 years ago
import { MTPNetworker } from "./networker";
import { InvokeApiOptions } from "../../types";
4 years ago
export class NetworkerFactory {
public updatesProcessor: (obj: any, bool: boolean) => void = null;
public setUpdatesProcessor(callback: (obj: any, bool: boolean) => void) {
this.updatesProcessor = callback;
}
public getNetworker(dcID: number, authKey: number[], authKeyID: Uint8Array, serverSalt: number[], options: InvokeApiOptions) {
//console.log('NetworkerFactory: creating new instance of MTPNetworker:', dcID, options);
4 years ago
return new MTPNetworker(dcID, authKey, authKeyID, serverSalt, options);
}
}
export default new NetworkerFactory();