diff --git a/toot/tui/compose.py b/toot/tui/compose.py index a931fa36..9dd02939 100644 --- a/toot/tui/compose.py +++ b/toot/tui/compose.py @@ -162,6 +162,10 @@ def post(self, button): self.set_error_message("Cannot post an empty message") return + if len(content) > self.max_chars: + self.set_error_message(f"Message exceeds maximum length of {self.max_chars} characters") + return + in_reply_to_id = self.in_reply_to.id if self.in_reply_to else None self._emit("post", content, warning, self.visibility, in_reply_to_id)