mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00
Fix large summary bridges.
This commit is contained in:
parent
5a9ed9d955
commit
ec32daff40
1
changelog.d/891.feature
Normal file
1
changelog.d/891.feature
Normal file
@ -0,0 +1 @@
|
|||||||
|
Retry failed feed messages.
|
@ -197,10 +197,10 @@ export class FeedConnection extends BaseConnection implements IConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async handleFeedEntry(entry: FeedEntry): Promise<void> {
|
public async handleFeedEntry(entry: FeedEntry): Promise<void> {
|
||||||
// We will need to tidy this up.
|
// This might be massive and cause us to fail to send the message
|
||||||
if (this.state.template?.match(/\$SUMMARY\b/) && entry.summary) {
|
// 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) {
|
if (entry.summary.length > MAX_SUMMARY_LENGTH) {
|
||||||
entry.summary = entry.summary.substring(0, MAX_SUMMARY_LENGTH) + "…";
|
entry.summary = entry.summary.substring(0, MAX_SUMMARY_LENGTH) + "…";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user