Closed NovemLinguae closed 7 months ago
This doesn't seem too difficult to implement, and this is a feature I've wanted for a while, so I'll try to work on this soon. Looks like after the user talk page is saved, the script should make a query to action=discussiontoolspageinfo, and use the data to subscribe to the thread. Should this also be included as an option in the AFCH preferences, so people can disable it if they don't want to be subscribed?
Definitely should be toggle-able; while I see this as a useful feature, I personally don't think I would use it.
This doesn't seem too difficult to implement, and this is a feature I've wanted for a while, so I'll try to work on this soon. Looks like after the user talk page is saved, the script should make a query to action=discussiontoolspageinfo, and use the data to subscribe to the thread. Should this also be included as an option in the AFCH preferences, so people can disable it if they don't want to be subscribed?
Or you could eliminate two steps and use https://www.mediawiki.org/w/api.php?action=help&modules=discussiontoolsedit directly
Or you could eliminate two steps and use mediawiki.org/w/api.php?action=help&modules=discussiontoolsedit directly
I'd rather not use discussiontoolsedit as posting to the user talk page is a critical function for which it's better to use the stable and longstanding core API (to which any breaking changes will be well-advertised) instead of an internal API. While discussiontoolssubscribe is also internal, it's only use will be for an optional enhancement.
Example API payload, with the "token" cropped out.
commentname is in the format h-FirstCommentUsername-FirstCommentTimestamp. Username spaces are converted to underscores.
Probably safest to use the discussiontoolspageinfo API to get the perfectly formatted commentname. We can iterate from the bottom up until we find a section starting with "h-". That's the section we just posted and the section that we need to subscribe to.
Requested by Asilvering at https://en.wikipedia.org/wiki/Wikipedia_talk:WikiProject_Articles_for_creation#Helper_script%3A_Add_an_option_to_disable_watchlisting_user_talk_pages
DiscussionTools has a nifty heading subscription feature, where you can click a [subscribe] feature on the top right of a heading, and then if anyone replies, you get notified in your notification tray. The benefit is that you don't have to watchlist entire pages when you just want to watch one section of a page.
Anyway, look into having AFCH auto subscribe the reviewer to user talk sections that AFCH creates. In case the new user replies and doesn't ping / doesn't know how to ping.
Implement this using the discussiontoolssubscribe API?
Discussiontoolssubscribe API is marked as internal. See also: https://phabricator.wikimedia.org/T329474