Edits not properly reset with Shared Drafts

Used the new Shared Drafts feature when writing up Discourse 2.0.0.beta5 Release Notes today. Prior to publishing the topic I made 2 edits. After publishing the topic I made another edit, which I then hid via “hide revision”.

Expected Results:

Anonymous viewer: no edits seen.
Non-staff user: no edits seen.
Staff user: 1 edit seen (but hidden).

Actual Results:

:x: Anonymous viewer: 3 edits seen. Blank edit history modal.
:x: Non-staff user: 3 edits seen. Blank edit history modal.
:white_check_mark: Staff user: 1 edit seen (but hidden)


Anon/logged in user view:

cc @eviltrout

An aside (maybe a bug?) - the grace edit window didn’t seem to apply after publishing. The post publishing edit was made with 10 seconds of publishing the posts, and changed less characters than the editing grace period max diff high trust (400). I’d expect it to be a grace edit and thus not logged?

7 Likes

Fixed here. I didn’t realize there’s a public_version that’s separate from the private_version:

https://github.com/discourse/discourse/commit/d4296f33fffa6d61d44aa948900e4fca9baa19d3

7 Likes

Also, this should fix the ninja editing:

https://github.com/discourse/discourse/commit/f03b6bd8c925163b41b9e33b39484d102dbaee44

7 Likes