Apps-android-commons: Upon deletion request, notification should be sent to uploader, not author

Created on 5 Sep 2019  路  8Comments  路  Source: commons-app/apps-android-commons

As I can't find this in the documentation (but now here on Issues on a screenshot) I reported here: https://phabricator.wikimedia.org/T232142 (closed because of this).

Edit: The relevant code seems here: https://github.com/commons-app/apps-android-commons/blob/11d36189d4d8dbac49f5d5c86a1b3b7e1166f266/app/src/main/java/fr/free/nrw/commons/delete/DeleteHelper.java#L116

It seems very false to take the creator of the file (but I don't get the code on https://github.com/commons-app/apps-android-commons/blob/5865d59d22124471470fb16fd847bbdc3d42bea0/app/src/main/java/fr/free/nrw/commons/Media.java#L337

As a maintainer of the desktop version, I can say there is an Api request needed to get the list of uploaders (here it seems there is only taken a single user/string, but I don't understand Java really).

bug high priority

All 8 comments

During the past 2 weeks I noticed a malfunction that might be a bug of this app: If a user creates a deletion request the notification is not sent to the uploader as it should be but to the name the 'author' field contains. If author and uploader are the same that doesn't matter but if the author (for example an author name imported from flickr) doesn't have a user account on Commons the notification fails. One of several examples can be seen here: https://commons.wikimedia.org/wiki/User_talk:David_W._Carmichael --Achim55
Next hit as of today: https://commons.wikimedia.org/wiki/User_talk:%D0%9C%D0%BE%D0%BD%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%81%D1%82_g.K.

@nicolas-raoul: This bug is a real problem. I don't like to fix almost daily the bad results on Commons. Best, Achim55 (Sysop on Commons)

Next hit: https://commons.wikimedia.org/wiki/User_talk:Luigi_Novi
Next hit: https://commons.wikimedia.org/wiki/User_talk:Amazon
Next hit: https://commons.wikimedia.org/wiki/User_talk:Chris_Wonderly
Should we disable Android access to Commons temporarily? Achim.

Next hit: https://commons.wikimedia.org/wiki/User_talk:D%C3%A9partement_des_Hauts-de-Seine
Next hit: https://commons.wikimedia.org/wiki/User_talk:Original:_Unknown,_foto%C4%9Fraf:_Rachmat04
Next hit: https://commons.wikimedia.org/wiki/User_talk:Tadeusz_Mieczy%C5%84ski
Next hit: https://commons.wikimedia.org/wiki/User_talk:Meodipt_(talk)
Next hit: https://commons.wikimedia.org/wiki/User_talk:Cobus_Rademeyer
Next hit: https://commons.wikimedia.org/wiki/User_talk:Warner_Bros.
@misaochan : Is there a real chance to get this issue solved?

Sorry, seems like we missed this (I was only notified of the ping today). Yes, we should be able to fix this shortly. Just to be clear what is needed - for instance, for https://commons.wikimedia.org/wiki/File:8.1.19VaughanChiangByLuigiNovi30.jpg we should send the notification to User:Nightscream, correct?

Correct, thank you.

Thanks for the confirmation, this will be included in the next release.

Hello I found this lines
https://github.com/commons-app/apps-android-commons/blob/02f5cdac595caa38c2340e5f31f5b3a5ad560402/app/src/main/java/fr/free/nrw/commons/contributions/Contribution.java#L178
The previous line belongs to the method called in this line:
https://github.com/commons-app/apps-android-commons/blob/02f5cdac595caa38c2340e5f31f5b3a5ad560402/app/src/main/java/fr/free/nrw/commons/upload/UploadClient.java#L60
Initially called from here
https://github.com/commons-app/apps-android-commons/blob/02f5cdac595caa38c2340e5f31f5b3a5ad560402/app/src/main/java/fr/free/nrw/commons/upload/UploadService.java#L193
which looks kind of fishy. I mean, if we are providing the creator value to the user field by default.
In the response from the API one can see something like this:
<a href="http://commons.wikimedia.org/wiki/User:Sanjay_ach" title="User:Sanjay ach">Sanjay ach</a>

Can someone help in summarising the issue for me?

I am confused because of @IgnacioGarcia198's comment. Is there an issue while uploading the picture or is there an issue while nominating a file for deletion?

Based on the initial comments posted on this issue thread, my understanding is that for https://commons.wikimedia.org/wiki/File:8.1.19VaughanChiangByLuigiNovi30.jpg, the app should try to notify, User:Nightscream instead of trying to send a notification to Luigi Novi.

As of now, the app sees the following value and picks the text instead of title/user url.

<a href=\"//commons.wikimedia.org/wiki/User:Nightscream\" title=\"User:Nightscream\">Luigi Novi</a>

@misaochan @Perhelion

@maskaravivek I was checking in the master branch. Should I check a different one? Actually on master it seems the code in DeleteHelper has changed, the issue might be different now. The same line @Perhelion referred to is looking like this now:
https://github.com/commons-app/apps-android-commons/blob/891d9ec41ce6b799fa6bc001c48da40074b09e9a/app/src/main/java/fr/free/nrw/commons/delete/DeleteHelper.java#L114
And after following for a while where the value of user variable was coming from, I ended up thinking it is coming from the backend so it might be the case the creator was saved as the user in the backend. (I do not know much about this backend so cannot say anything concluding).

Based on the initial comments posted on this issue thread, my understanding is that for https://commons.wikimedia.org/wiki/File:8.1.19VaughanChiangByLuigiNovi30.jpg, the app should try to notify, User:Nightscream instead of trying to send a notification to Luigi Novi.

Yes, this is correct according to @Achim55 's reply to me. So we should pick the title/user url, not the text.

Is there an issue while uploading the picture or is there an issue while nominating a file for deletion?

Nominating the file for deletion.

Was this page helpful?
0 / 5 - 0 ratings