(
client: any,
route: SlackRoute,
text: string,
placeholder?: SlackPostedMessage | null,
)
| 490 | } |
| 491 | |
| 492 | private async sendLongMessage( |
| 493 | client: any, |
| 494 | route: SlackRoute, |
| 495 | text: string, |
| 496 | placeholder?: SlackPostedMessage | null, |
| 497 | ): Promise<void> { |
| 498 | const chunks = this.splitMessage(text); |
| 499 | |
| 500 | if (chunks.length === 0) { |
| 501 | return; |
| 502 | } |
| 503 | |
| 504 | if (placeholder) { |
| 505 | await this.updateMessageSafe(client, route, placeholder.ts, chunks[0]); |
| 506 | for (const chunk of chunks.slice(1)) { |
| 507 | await this.sendSafe(client, route, chunk); |
| 508 | } |
| 509 | return; |
| 510 | } |
| 511 | |
| 512 | for (const chunk of chunks) { |
| 513 | await this.sendWithRetry(client, route, chunk); |
| 514 | } |
| 515 | } |
| 516 | |
| 517 | private async sendSafe( |
| 518 | client: any, |
no test coverage detected