From 7dd315499bd91a361d3511929b08a1d1c5f54816 Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Wed, 1 Jan 2025 17:00:12 +0200 Subject: [PATCH] constrain post to 300 characters --- bot/src/bluesky/atproto.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bot/src/bluesky/atproto.rs b/bot/src/bluesky/atproto.rs index c8340f9..ca8e1ab 100644 --- a/bot/src/bluesky/atproto.rs +++ b/bot/src/bluesky/atproto.rs @@ -122,7 +122,12 @@ impl From for ATProtoRepoCreateRecord { Some(ATprotoRepoCreateRecordEmbed::new( post.link.unwrap().as_str(), post.title.unwrap().as_str(), - post.summary.unwrap().as_str(), + post.summary + .clone() + .unwrap() + .as_str() + .get(0..=300) + .unwrap_or(post.summary.unwrap().as_str()), None, )), ),