constrain post to 300 characters
This commit is contained in:
parent
2b1750cae2
commit
7dd315499b
1 changed files with 6 additions and 1 deletions
|
@ -122,7 +122,12 @@ impl From<NewsPost> for ATProtoRepoCreateRecord {
|
||||||
Some(ATprotoRepoCreateRecordEmbed::new(
|
Some(ATprotoRepoCreateRecordEmbed::new(
|
||||||
post.link.unwrap().as_str(),
|
post.link.unwrap().as_str(),
|
||||||
post.title.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,
|
None,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue