Fix large summary bridges.

This commit is contained in:
Half-Shot 2024-02-06 14:44:33 +00:00
parent 5a9ed9d955
commit ec32daff40
2 changed files with 5 additions and 4 deletions

1
changelog.d/891.feature Normal file
View File

@ -0,0 +1 @@
Retry failed feed messages.

View File

@ -197,10 +197,10 @@ export class FeedConnection extends BaseConnection implements IConnection {
}
public async handleFeedEntry(entry: FeedEntry): Promise<void> {
// We will need to tidy this up.
if (this.state.template?.match(/\$SUMMARY\b/) && entry.summary) {
// This might be massive and cause us to fail to send the message
// so confine to a maximum size.
// This might be massive and cause us to fail to send the message
// so confine to a maximum size.
if (entry.summary) {
if (entry.summary.length > MAX_SUMMARY_LENGTH) {
entry.summary = entry.summary.substring(0, MAX_SUMMARY_LENGTH) + "…";
}