diff --git a/.DS_Store b/.DS_Store index b0aa06d..2a0b6a7 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.vscode/settings.json b/.vscode/settings.json index 2394f05..e3c8d80 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,7 @@ "search.useIgnoreFiles": false, "files.watcherExclude": { "**/.git/objects/**": true, - "**/node_modules/**": true + "**/node_modules/**": true, + "**/src/server/router/upload/**": true }, } \ No newline at end of file diff --git a/src/server/router/index_router.js b/src/server/router/index_router.js index 8fbdf69..10c0072 100755 --- a/src/server/router/index_router.js +++ b/src/server/router/index_router.js @@ -1836,6 +1836,8 @@ function uploadFile(req, res, version) { // console.log('tofile', tofile); if (!tools.sulServer()) { + console.log('Dovresti copiare fromfile', fromfile, 'tofile', tofile); + console.log('cp ', fromfile, tofile); res.end(); return; } diff --git a/src/server/telegram/telegrambot.js b/src/server/telegram/telegrambot.js index 6dd0687..9c525a5 100755 --- a/src/server/telegram/telegrambot.js +++ b/src/server/telegram/telegrambot.js @@ -3913,6 +3913,7 @@ class Telegram { async setPhotoProfile(user, telegid, showmsg = true) { try { + console.log('setPhotoProfile', user ? user.username : '') if (user) { const idapp = this.idapp; const bot = this.bot; @@ -3924,6 +3925,10 @@ class Telegram { server_constants.DIR_UPLOAD + '/profile/' + username + '/'; let user_profile = bot.getUserProfilePhotos(telegid); user_profile.then(function (res) { + if (res.total_count === 0) { + // Non ho l'accesso oppure sono davvero senza foto ! + + } if (res.photos[0]) { var file_id = res.photos[0][2].file_id; var file = bot.getFile(file_id);