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.
68 lines
1.2 KiB
68 lines
1.2 KiB
let json = require('./in/schema'); |
|
|
|
let top = {}; |
|
/* ['MTProto', 'API'].forEach(key => { |
|
let schema = json[key]; |
|
let out = {constructors: {}, methods: {}}; |
|
|
|
['constructors', 'methods'].forEach(key => { |
|
schema[key].forEach(smth => { |
|
let id = smth.id; |
|
|
|
if(id < 0) { |
|
id = +id + 4294967296; |
|
} |
|
|
|
out[key][id] = smth; |
|
delete smth.id; |
|
}); |
|
}); |
|
|
|
top[key] = out; |
|
|
|
//console.log(out); |
|
//process.exit(0); |
|
}); */ |
|
|
|
['MTProto', 'API'].forEach(key => { |
|
let schema = json[key]; |
|
|
|
['constructors', 'methods'].forEach(key => { |
|
schema[key].forEach(smth => { |
|
if(+smth.id < 0) { |
|
smth.id = +smth.id + 4294967296; |
|
} |
|
}); |
|
}); |
|
|
|
//console.log(out); |
|
//process.exit(0); |
|
}); |
|
top = json; |
|
|
|
/* ['API'].forEach(key => { |
|
let schema = json[key]; |
|
let out = {constructors: {}, methods: {}}; |
|
|
|
['constructors', 'methods'].forEach(key => { |
|
schema[key].forEach(smth => { |
|
let id = smth.id; |
|
|
|
if(id < 0) { |
|
id = id + 4294967296; |
|
} |
|
|
|
out[key][id] = smth; |
|
delete smth.id; |
|
}); |
|
}); |
|
|
|
top[key] = out; |
|
|
|
//console.log(out); |
|
//process.exit(0); |
|
}); */ |
|
|
|
//console.log(out); |
|
|
|
require('fs').writeFileSync('./out/schema.json', JSON.stringify(top/* , null, '\t' */)); |