ver 1.0.25
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -2,6 +2,7 @@
|
|||||||
"search.useIgnoreFiles": false,
|
"search.useIgnoreFiles": false,
|
||||||
"files.watcherExclude": {
|
"files.watcherExclude": {
|
||||||
"**/.git/objects/**": true,
|
"**/.git/objects/**": true,
|
||||||
"**/node_modules/**": true
|
"**/node_modules/**": true,
|
||||||
|
"**/src/server/router/upload/**": true
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -1836,6 +1836,8 @@ function uploadFile(req, res, version) {
|
|||||||
// console.log('tofile', tofile);
|
// console.log('tofile', tofile);
|
||||||
|
|
||||||
if (!tools.sulServer()) {
|
if (!tools.sulServer()) {
|
||||||
|
console.log('Dovresti copiare fromfile', fromfile, 'tofile', tofile);
|
||||||
|
console.log('cp ', fromfile, tofile);
|
||||||
res.end();
|
res.end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3913,6 +3913,7 @@ class Telegram {
|
|||||||
|
|
||||||
async setPhotoProfile(user, telegid, showmsg = true) {
|
async setPhotoProfile(user, telegid, showmsg = true) {
|
||||||
try {
|
try {
|
||||||
|
console.log('setPhotoProfile', user ? user.username : '')
|
||||||
if (user) {
|
if (user) {
|
||||||
const idapp = this.idapp;
|
const idapp = this.idapp;
|
||||||
const bot = this.bot;
|
const bot = this.bot;
|
||||||
@@ -3924,6 +3925,10 @@ class Telegram {
|
|||||||
server_constants.DIR_UPLOAD + '/profile/' + username + '/';
|
server_constants.DIR_UPLOAD + '/profile/' + username + '/';
|
||||||
let user_profile = bot.getUserProfilePhotos(telegid);
|
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 !
|
||||||
|
|
||||||
|
}
|
||||||
if (res.photos[0]) {
|
if (res.photos[0]) {
|
||||||
var file_id = res.photos[0][2].file_id;
|
var file_id = res.photos[0][2].file_id;
|
||||||
var file = bot.getFile(file_id);
|
var file = bot.getFile(file_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user