balanceofsatoshis 11.36.1 → 11.36.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Versions
2
2
 
3
- ## 11.36.1
3
+ ## 11.36.2
4
4
 
5
5
  - `telegram`: Add support for `--use-proxy` to specify a SOCKS proxy server
6
6
 
package/package.json CHANGED
@@ -37,11 +37,11 @@
37
37
  "ln-accounting": "5.0.5",
38
38
  "ln-service": "53.5.2",
39
39
  "ln-sync": "3.7.0",
40
- "ln-telegram": "3.10.0",
40
+ "ln-telegram": "3.11.0",
41
41
  "moment": "2.29.1",
42
42
  "paid-services": "3.11.0",
43
43
  "probing": "2.0.2",
44
- "psbt": "1.1.10",
44
+ "psbt": "1.1.11",
45
45
  "qrcode-terminal": "0.12.0",
46
46
  "sanitize-filename": "1.6.3",
47
47
  "socks-proxy-agent": "6.1.1",
@@ -81,5 +81,5 @@
81
81
  "postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis --push .",
82
82
  "test": "tap --branches=1 --functions=1 --lines=1 --statements=1 -t 60 test/arrays/*.js test/balances/*.js test/chain/*.js test/display/*.js test/encryption/*.js test/lnd/*.js test/network/*.js test/nodes/*.js test/peers/*.js test/responses/*.js test/routing/*.js test/services/*.js test/swaps/*.js test/tags/*.js test/wallets/*.js"
83
83
  },
84
- "version": "11.36.1"
84
+ "version": "11.36.2"
85
85
  }
@@ -18,6 +18,7 @@ const {handleButtonPush} = require('ln-telegram');
18
18
  const {handleConnectCommand} = require('ln-telegram');
19
19
  const {handleCostsCommand} = require('ln-telegram');
20
20
  const {handleEarningsCommand} = require('ln-telegram');
21
+ const {handleEditedMessage} = require('ln-telegram');
21
22
  const {handleInvoiceCommand} = require('ln-telegram');
22
23
  const {handleLiquidityCommand} = require('ln-telegram');
23
24
  const {handleMempoolCommand} = require('ln-telegram');
@@ -275,18 +276,11 @@ module.exports = (args, cbk) => {
275
276
 
276
277
  bot.catch(err => logger.error({telegram_error: err}));
277
278
 
278
- bot.use((ctx, next) => {
279
- // Ignore messages that are old
280
- if (!!ctx.message && msSince(ctx.message.date) > maxCommandDelayMs) {
281
- return;
282
- }
283
-
284
- // Warn on edit of old message
285
- if (!!ctx.update && !!ctx.update.edited_message) {
286
- const {text} = ctx.update.edited_message;
287
- const warning = interaction.edit_message_warning;
288
-
289
- return ctx.reply(`${warning}\n${text}`, markdown);
279
+ bot.use(async (ctx, next) => {
280
+ try {
281
+ await handleEditedMessage({ctx});
282
+ } catch (err) {
283
+ logger.error({err});
290
284
  }
291
285
 
292
286
  return next();
@@ -295,7 +289,6 @@ module.exports = (args, cbk) => {
295
289
  bot.command('backup', ctx => {
296
290
  handleBackupCommand({
297
291
  logger,
298
- request,
299
292
  from: ctx.message.from.id,
300
293
  id: connectedId,
301
294
  key: apiKey.key,
@@ -393,12 +386,10 @@ module.exports = (args, cbk) => {
393
386
  },
394
387
  }, async () => {
395
388
  await handleLiquidityCommand({
396
- request,
397
389
  from: ctx.message.from.id,
398
390
  id: connectedId,
399
- key: apiKey.key,
400
391
  nodes: allNodes,
401
- reply: ctx.reply,
392
+ reply: n => ctx.reply(n, markdown),
402
393
  text: ctx.message.text,
403
394
  working: () => ctx.replyWithChatAction('typing'),
404
395
  });