Page MenuHomePhabricator

Thanking using the API isn't reflected on action=history, thanking again returns "success"
Open, Needs TriagePublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Thank an edit outside the page history using the API.
new mw.Api;
api.postWithEditToken({action:'thank',rev:279988,source:'Test!'});

The revision in the example exists on https://commons.wikimedia.beta.wmflabs.org/wiki/User_talk:AJ-test. The thank arrives, I tested that.

Now go to page history.
What happens?:
( undo | thank )

And when thanking there, the "thank" becomes "thanked". The API returns {"result":{"success":1,"recipient":"AJ-test"}}, but no new thank is delivered.

What should have happened instead?:
I'd expect to see "thanked" on the page history.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
I could imagine technical restrictions on showing what was thanked on the page history, I must admit that within my script I can also only show the edits you already thanked by using my script to thank them. But I figured the extension would have more extensive access.

Possibly more confusing is the API response. You can run the example over and over on the same revision and it'll always return "success", but it's only actually delivered once.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
kostajh added subscribers: KStoller-WMF, kostajh.

Thanks for the bug report. It is unlikely that Growth team will be working on this in the short term, but perhaps it would make sense to fit this in somewhere in Growth-Positive-Reinforcement if we want to use the API for thanking actions (cc @KStoller-WMF).

Thanks for the bug report. It is unlikely that Growth team will be working on this in the short term, but perhaps it would make sense to fit this in somewhere in Growth-Positive-Reinforcement if we want to use the API for thanking actions (cc @KStoller-WMF).

There are two userscripts that I know of that allow thanking using the API. I found this issue because I noticed that an edit I had thanked using a script didn't show as "thanked" on the page history. (but as testing proves, the edit was in fact thanked) Interestingly, if you thank on the page history (the regular method) the exact same API request is made. Only difference would be the "source" field. I'm not sure how/where the fact you've thanked an edit is stored/retrieved.