Join Nostr
2026-07-01 04:51:27 UTC

CaohuaK on Nostr: silverpill Can we add 'max_toot_chars' to the api/v1/instance endpoint? Some Mastodon ...

Can we add 'max_toot_chars' to the api/v1/instance endpoint? Some Mastodon apps like Husky depend on it to know the maximum character count for the instance.

https://github.com/captainepoch/husky/blob/master/husky/app/src/main/java/com/keylesspalace/tusky/components/instance/data/models/data/Instance.kt#L37

diff --git a/mitra_api/src/mastodon_api/instance/types.rs b/mitra_api/src/mastodon_api/instance/types.rs
index b054ac2a..af3e1263 100644
--- a/mitra_api/src/mastodon_api/instance/types.rs
+++ b/mitra_api/src/mastodon_api/instance/types.rs
@@ -267,6 +267,8 @@ pub struct InstanceInfo {
blockchains: Vec<BlockchainInfo>,
ipfs_gateway_url: Option<String>,

+ max_toot_chars: usize,
+
pleroma: PleromaInfo,
}

@@ -340,6 +342,7 @@ impl InstanceInfo {
.map(BlockchainInfo::from)
.collect(),
ipfs_gateway_url: config.ipfs_gateway_url.clone(),
+ max_toot_chars: config.limits.posts.character_limit,
pleroma: PleromaInfo {
metadata: PleromaMetadata::new(),
},