diff --git a/package-lock.json b/package-lock.json index a956f405..5b79fa38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "lnp2pbot", - "version": "0.13.3", + "version": "0.14.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "lnp2pbot", - "version": "0.13.3", + "version": "0.14.1", "license": "MIT", "dependencies": { "@grammyjs/i18n": "^0.5.1", diff --git a/tests/bot/bot.spec.ts b/tests/bot/bot.spec.ts index c06fc810..ea639723 100644 --- a/tests/bot/bot.spec.ts +++ b/tests/bot/bot.spec.ts @@ -310,7 +310,7 @@ describe('Bot Initialization', () => { deleteOrders: sinon.stub().resolves(), calculateEarnings: sinon.stub().resolves(), attemptCommunitiesPendingPayments: sinon.stub().resolves(), - deleteCommunity: sinon.stub().resolves(), + // deleteCommunity: sinon.stub().resolves(), nodeInfo: sinon.stub().resolves(), }, './modules/community': { configure: sinon.stub() }, @@ -470,7 +470,7 @@ describe('Bot Initialization', () => { scheduledFunction(); - expect(scheduleStub.scheduleJob.callCount).to.be.equal(8); + expect(scheduleStub.scheduleJob.callCount).to.be.equal(7); expect(scheduleStub.scheduleJob.getCall(0).args[0]).to.equal( '*/10 * * * *', ); diff --git a/util/imageCache.ts b/util/imageCache.ts index a5208fbb..3ea59cfe 100644 --- a/util/imageCache.ts +++ b/util/imageCache.ts @@ -115,11 +115,16 @@ class ImageCacheManager { try { // Check if the image is already base64 data (legacy format) // Base64 strings are much longer than filenames and typically don't contain file extensions in the middle - if (image.length > 100 && !image.includes('.png') && !image.includes('.jpg') && !image.includes('.jpeg')) { + if ( + image.length > 100 && + !image.includes('.png') && + !image.includes('.jpg') && + !image.includes('.jpeg') + ) { logger.debug('Image appears to be base64 data, returning as-is'); return image; } - + // Otherwise, treat as filename and read from disk const imageData = await fs.readFile(`images/${image}`); return imageData.toString('base64');