- sistemato timeout corto
- corretto errori sulla generazione del PDF - corretto alcune directory - corretto fs.promise - corretto CORS !
This commit is contained in:
@@ -4152,7 +4152,7 @@ class Telegram {
|
||||
let myfileprofile = tools.getdirByIdApp(idapp, true) +
|
||||
server_constants.DIR_UPLOAD + '/profile/' + username + '/';
|
||||
let user_profile = bot.getUserProfilePhotos(telegid);
|
||||
user_profile.then(function (res) {
|
||||
user_profile.then( function (res) {
|
||||
if (res.total_count === 0) {
|
||||
// Non ho l'accesso oppure sono davvero senza foto !
|
||||
|
||||
@@ -4160,7 +4160,7 @@ class Telegram {
|
||||
if (res.photos[0]) {
|
||||
var file_id = res.photos[0][2].file_id;
|
||||
var file = bot.getFile(file_id);
|
||||
file.then(function (result) {
|
||||
file.then(async function (result) {
|
||||
|
||||
const file_path = result.file_path;
|
||||
const photo_url = 'https://api.telegram.org/file/bot' + token +
|
||||
@@ -4170,7 +4170,7 @@ class Telegram {
|
||||
myfileprofile += filename;
|
||||
|
||||
const pathfile = tools.extractFilePath(myfileprofile);
|
||||
tools.mkdirpath(pathfile);
|
||||
await tools.mkdirpath(pathfile);
|
||||
|
||||
// console.log('2) myfileprofile', pathfile);
|
||||
return tools.downloadImage(photo_url, myfileprofile).
|
||||
|
||||
Reference in New Issue
Block a user