https://bugzilla.wikimedia.org/show_bug.cgi?id=72500

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected],
                   |                            |[email protected]
                   |                            |om

--- Comment #2 from [email protected] ---
The problem is
FlowBoardComponentApiEventsMixin.UI.events.apiPreHandlers.watchItem() sets the
request up with
   token: mw.user.tokens.get( 'watchToken' );
This is a static assignment, it doesn't check if the token is still good.

as a result flowApiCall does a plain mwApi.post with this token, rather than a
mwApi.postWithToken( 'watch', params ) which would correctly fetch a new token.

The logic needs to be changed. E.g. the apiPreHandler can supply a tokenName:
'watch' rather than the static value of a token, and flowApiCall() always
invokes mwApi.postWithToken passing tokenName or the default 'edit'.  Or
perhaps Flow could invoke mediawiki.api.watch's watch()/unwatch() instead of
calling the API itself.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to