Skip to content

Commit

Permalink
Add message length truncation
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Jun 1, 2024
1 parent 351c049 commit e71b5b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/event_news.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ impl EventExt for Event {
let venue = Venue::from_schedule_name(&self.venue);

let news_number = news_number_for_venue(&venue);
let msg = format!("<{}> {}", venue_short_name(venue), self.title);
let mut msg = format!("<{}> {}", venue_short_name(venue), self.title);
if msg.len() > 80 {
msg = format!("{}...", &msg[0..77]);
}

match OutgoingNewsBuilder::default()
.rubric("emfcamp".to_string())
Expand Down

0 comments on commit e71b5b9

Please sign in to comment.