Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow redirects when notifying users #322

Merged

Conversation

NovemLinguae
Copy link
Member

Fixes #90

Advantages

  • Simpler than patch Recursively identify renamed username of submitter #291
  • The original intent of the function notifyUser was to follow redirects, indicated by the comment "Follows redirects and appends a message to the bottom of the user's talk page." from 2014. So this fixes that bug.

Disadvantages

  • Will only follow 1 redirect, not 2+ redirects.
  • The "Saved [[User talk:OldUsername]] (diff)" message shown to the AFC reviewer will be slightly incorrect. The diff will be correct, but OldUsername should ideally be NewUsername.

Fixes wikimedia-gadgets#90

Advantages
- Simpler than patch wikimedia-gadgets#291
- The original intent of the function notifyUser was to follow redirects, indicated by the comment "Follows redirects and appends a message to the bottom of the user's talk page." from 2014. So this fixes that bug.

Disadvantages
- Will only follow 1 redirect, not 2+ redirects.
- The "Saved [[User talk:OldUsername]] (diff)" message shown to the AFC reviewer will be slightly incorrect. The diff will be correct, but OldUsername should ideally be NewUsername.
@NovemLinguae
Copy link
Member Author

I don't really care which of these two patches (this one or #291) gets merged. They both have pros and cons as mentioned in the advantages and disadvantages section above. @siddharthvp or anyone else, do you have a preference? Let's get one of these merged so this is unstuck.

@primefac
Copy link

Very rarely will there be two redirects, so I am less concerned about that. The "old" username showing is a bit naff, but if anyone clicks on it they'll be redirected anyway so it's probably not a huge deal.

I'm a huge fan of simplicity, but if the other patch can deal with both of these issues, I suppose we go with that?

@NovemLinguae
Copy link
Member Author

I'm planning to abandon this patch on Monday in favor of #291 unless there are more comments over the weekend.

@siddharthvp
Copy link
Member

Will only follow 1 redirect, not 2+ redirects.

There won't ever be 2+ redirects, right? There are bots that automatically simplify double redirects as MW itself follows upto 1 redirect only.

The "Saved [[User talk:OldUsername]] (diff)" message shown to the AFC reviewer will be slightly incorrect. The diff will be correct, but OldUsername should ideally be NewUsername.

This doesn't seem like a real disadvantage. It's common to refer to a page via a redirect name, and that's assuming anyone pays attention to the message.

@siddharthvp
Copy link
Member

I think this is good to go for now and doesn't preclude #291 - although I'm not a fan of the extra API calls and complexity it introduces.

@siddharthvp siddharthvp merged commit 1c45527 into wikimedia-gadgets:master Apr 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script should follow user talk page redirects
3 participants