nolanlawson / pinafore

Alternative web client for Mastodon (UNMAINTAINED)
https://pinafore.social
GNU Affero General Public License v3.0
1.02k stars 172 forks source link

Edit toot #2179

Open nolanlawson opened 1 year ago

nolanlawson commented 1 year ago

I guess this is a new thing in Mastodon? Needs some way to determine whether or not the server supports it, though. E.g. I dunno if Pleroma supports this.

tbroyer commented 1 year ago

Will apparently be in Pleroma 2.5.0: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3678

I suppose that one way to detect support is to look at the version field of /api/v1/instance, and look for a version >= 3.5.0 (or 4.0.0 for when the feature was enabled in Mastdon's web UI). Pleroma returns 2.7.2 currently so it wouldn't be detected as supporting editing. No idea what it'll return when they release 2.5.0 with editing feature so might have to revisit (will they still return 2.7.2 (compatible; Pleroma 2.5.0)? In which case detection would have to look for the Pleroma version as well)

nolanlawson commented 1 year ago

@tbroyer Thanks for the info. Usually what I do in these sorts of situations is look to other fediverse clients and see how they handle it. E.g. max_toot_chars used to be the way to communicate the number of max toot characters, but that changed: https://github.com/nolanlawson/pinafore/issues/2187

From a glance at https://mastodon.social/api/v1/instance though I don't see anything related to toot editing, so probably version-sniffing will be the only solution.

tbroyer commented 1 year ago

The official Android application apparently doesn't do any detection/sniffing, whereas the iOS application doesn't support editing yet.

Tooot apparently uses version sniffing for everything: https://github.com/tooot-app/app/blob/bd750da9d5888cde07fb8f29ded9821695e1de07/src/helpers/features.json / https://github.com/tooot-app/app/blob/bd750da9d5888cde07fb8f29ded9821695e1de07/src/utils/slices/instancesSlice.ts#L326-L335

Same for iMast: https://github.com/cinderella-project/iMast/blob/931b265013aa0b11a683dba67f435bf3dd6bf4cd/Sources/iOS/App/CustomViews/Post/PostDetail/MastodonPostDetailReactionBarViewController.swift#L138-L142

Tusky will likely do version-sniffing: https://github.com/tuskyapp/Tusky/pull/2828#issuecomment-1322741526

Other apps I've looked at don't support editing yet.

jdaviescoates commented 1 year ago

Yeah, I just came here to say that I miss having the new edit function when using Pinafore

(and Tusky doesn't seem to have it yet either so missing it there too!)

tbroyer commented 1 year ago

Fwiw, there are several tasks:

  1. support toots edited in other applications (generally toots by other users)
  2. support editing own toots (https://docs.joinmastodon.org/methods/statuses/#edit)
NickColley commented 1 year ago

I wonder if we replace the 'Delete and redraft' option with edit for clients on a mastodon version that support it, can anyone think of a reason to keep both options?

expertmanofficial commented 1 year ago

@nolanlawson I can't wait for the Edit Button!

Look, there's another Mastodon client which is Sengi and recently it got it's own Edit button which allows Sengi users to edit their toots!

See? It is possible.

That means that you can do that too.

I really really really hate the "Delete&re-draft" option, HOWEVER I using it since I need to edit my toots.

I just want to edit my toots without deleting them!

I just can't wait for Edit button!

My patience are ending for waiting it....

expertmanofficial commented 1 year ago

@expertmanofficial you can use the main mastodon client if you need to edit.

Well, do you know that when you send a toot anyone can see which Mastodon client or web did you used for that to do so?

So, imagine:

I am posting a toot in Pinafore, I see the grammar mistake I did and I want to edit.

So I am going to Mastodon original instance, spending billions of centuries to find it and finally (!!!) editing it!

Guess now what?

The device/Mastodon client app now going to be changed which will show people that I used original Mastodon instance to edit it.

I want to have the toot to be stuck at "Pinafore" (in my example!) and don't want people to let see that i used original Mastodon instance to edit it.

If you'd like to express your support for this feature respond with a thumbs up to the original comment.

@NickColley I did it already. Still I don't have the Edit button.