Skip to content

Implementing threads #850

Answered by neet
ameyayeg asked this question in Q&A
Feb 5, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

The number of letters you can use in a single post is depending on your instance's configuration, so you need to fetch the limitation first. You can see it via configuration.statuses.maxCharacters from masto.v2.instance.fetch.

After splitting the text by the given limit, you need to create a thread. However, there is no concept like a thread in Mastodon API. Instead, you just have to create the first post, then the second post as a reply, then the third post as a reply... and so on. You can do that by masto.v1.statuses.create with inReplyToId.

Let me know if you need a more elaborate description or working code.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ameyayeg
Comment options

Answer selected by ameyayeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants