ver 1.0.25

This commit is contained in:
Surya Paolo
2024-02-03 23:04:56 +01:00
parent 0c2a8ecef5
commit 9fe81713e5
4 changed files with 9 additions and 1 deletions

View File

@@ -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;
}

View File

@@ -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);