HomePhabricator

[herald] Handle messages longer than Telegram max

Description

[herald] Handle messages longer than Telegram max

Summary:
T2972

Telegram will not broadcast a message longer than 4096 characters. These will throw an error.

These need to be handled somehow. This diff makes sure the telegram bot does not try to broadcast messages longer than 4096 characters.

  • If the block summary msg is less than 4096 characters, it is sent as normal
  • If the block summary msgs is greater than 4096 characters, it is divided into multiple msgs, and each one is sent replying the the previous msg

Test Plan: npm test

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13840

Details

Provenance
bytesofmanAuthored on Apr 29 2023, 00:00
bytesofmanPushed on May 3 2023, 14:28
Reviewer
Restricted Project
Differential Revision
D13840: [herald] Handle messages longer than Telegram max
Parents
rABCd6498cbfedb9: [prettier linter] lint cashtab
Branches
Unknown
Tags
Unknown