Add new [E]dit command to the timeline: opens an existing toot to allow
editing it. Since this is more or less the same operation as posting a
new toot, extend the StatusComposer view to support this rather than
implementing a new view.
Add a new api method, fetch_status_source(), to implement the
/api/v1/statuses/{id}/source endpoint used to fetch the original post
text.
Mastodon allows the user to configure a default visibility which should
apply to all clients. This setting is returned by the
/api/v1/preferences method.
Fetch the user preferences when the TUI starts, and use it to set the
default visibility when composing a new toot. The preference can be
overridden by a new command-line option, toot tui --default-visibility=.
If neither the preference nor the option are set, fall back to
get_default_visibility().
When replying to a toot, the visibility gets set to default: if the toot
has a direct visibility, the visibility in reply will be changed to the
default one, whereas it should stay in direct mode.
We add a "mentions" attribute to Status. Then when composing a reply, we
fill the edit text of the compose box with the account name of status
being replied to and possibly include mentions at the bottom of the edit
text. Initial cursor position is set after replied account name.