Page MenuHomePhabricator

[herald] If telegram msgs are too long to broadcast, batch them
AbandonedPublic

Authored by bytesofman on May 3 2023, 14:16.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

T2972

Supersedes D13840, which was inadvertently built on top of a non-master commit. This diff squashes that commit. The code is the same as D13840.

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
herald-handle-overflow-msgs
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23616
Build 46846: Build Diffecash-herald-tests
Build 46845: arc lint + arc unit