Possible bug using the JSON API for deleting replies

Hello again :slight_smile:

Two things really, the GET request to /posts/replies that returns recent replies for a user always has the field is_deletable set to true. Even if it has been 24 hours passed its creation.

Secondly, and I’m not 100% sure on this one, if you delete a reply after the 24 hours, it won’t delete it (which is expected) but it does delete all replies it can (that are less than 24 hours old). This has happened to me twice when I was testing/building things out.

I’ve been attempting to calculate the 24 hour time difference off the date_published to hide the delete button in my UI. I must be off… (I bet it’s the timezone, I really dislike dates in JavaScript) and earlier today when using my little app and trying to delete a test reply from yesterday it deleted all my recent replies and not the one I was trying to delete (that I thought was still within the 24 hour window).

Note: Everything deletes fine (as in deleting a singular reply) if I do a DELETE request on /posts/replies well within 24 hours. It’s only when it’s past that 24 hour mark that I’ve noticed multiple unrelated and recent replies deleted.

Anyway, I thought I’d bring it to your attention.


Thanks, I’m looking into this. However, to clarify: you should be able to delete a reply any time, even after 24 hours. The 24 hours is supposed to be an editing restriction. So you can edit a reply within the first 24 hours, but not after. This was designed to discourage people from editing a reply much later to significantly change the meaning in a conversation, although I think in the long run if we show the edit history that would also be good.

Got it :+1:

Then I’m not sure why I occasionally get additional replies deleted using the API. Here is the id of the reply I tried to delete this morning 23106337. It ended up not deleting that one but one other (maybe two, I can’t remember) replies I made after it. Hopefully that helps bug hunting :grinning:

Thanks Manton,