Page MenuHomePhabricator

Edit: Watch pages
Closed, ResolvedPublic

Description

The edit api should be able to handle watching of pages, and also to distinguish between per default watching and per edit specified watching. Following cases should be possible I think:

Case | Page | Default | Per Edit | Result

1 | null | true | null | true
2 | null | false | null | false
3 | null | true/false | true | true
4 | null | true/false | false | false
5 | true | true/false | null | true
6 | false | true/false | null | false
7 | true/false | true/false | true | true
8 | true/false | true/false | false | false

Where null is absent page or parameter not defined, true is either watched page, or watched specified, false otherwise.


Version: unspecified
Severity: enhancement

Details

Reference
bz11604

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:56 PM
bzimport set Reference to bz11604.
bzimport added a subscriber: Unknown Object (MLST).

We can just create action=watch. If people want to edit and watch/unwatch a page at the same time, they'll have to make two requests.

(In reply to comment #1)

We can just create action=watch. If people want to edit and watch/unwatch a
page at the same time, they'll have to make two requests.

Would the settings defined in the inwiki preferences then apply to edits? the settings for watch creation, watch edits, watch moves and watch deletes.

I have at the moment a real problem with this in Twinkle, that I don't know if the specified value in wpWatchThis is based on a per user earlier specified for this page, or if it's the default. Some actions would preferably work like this: if the user in the script config has specified to watch the page, then we will watch the page, else if not, if the page has been already watched by the user, then we keep watching the page, if only the default says we should watch the page, we won't watch the page. At the moment, I can only see two of those, and it's a problem.

(In reply to comment #2)

(In reply to comment #1)
Would the settings defined in the inwiki preferences then apply to edits? the
settings for watch creation, watch edits, watch moves and watch deletes.

Good point there. Maybe action=edit should have an epWatch parameter (set to either 0 or 1) that overrules everything. If epWatch isn't set, default behavior would be observed (i.e. watch if the prefs say so, else don't change the watch flag). If you want this done, though, contact the maintainer of the APIedit_vodafone branch.

Implemented with watch and unwatch parameters in r31514