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

Fixes #3464, App posts deletion request notifications ({{subst:idw}}) on the wrong user's talk page #3495

Merged
merged 9 commits into from
Mar 17, 2020
26 changes: 2 additions & 24 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ private Observable<Boolean> delete(Media media, String reason) {
String userPageString = "\n{{subst:idw|" + media.getFilename() +
"}} ~~~~";

String creator = media.getCreator().replace(" (page does not exist)", "");

return pageEditClient.prependEdit(media.filename, fileDeleteString + "\n", summary)
.flatMap(result -> {
if (result) {
Expand All @@ -111,7 +113,7 @@ private Observable<Boolean> delete(Media media, String reason) {
throw new RuntimeException("Failed to nominate for deletion");
}).flatMap(result -> {
if (result) {
return pageEditClient.appendEdit("User_Talk:" + username, userPageString + "\n", summary);
return pageEditClient.appendEdit("User_Talk:" + creator, userPageString + "\n", summary);
}
throw new RuntimeException("Failed to nominate for deletion");
});
Expand Down