maratonusp / contestwatcher

A telegram bot for checking upcoming contests
MIT License
55 stars 16 forks source link

some users get ignored on rating changes #33

Closed victorsenam closed 6 years ago

gabrielrussoc commented 6 years ago

here we get all the handles from the cf API call, which are exactly as in the website (with capital letters) https://github.com/maratonime/contestwatcher/blob/548aec49ff000bed366f9effa0618981fa1f8450/fetchers/codeforces.js#L47

and here we compare them to the handles in our database (which are being lowercased - done by #26 ) https://github.com/maratonime/contestwatcher/blob/548aec49ff000bed366f9effa0618981fa1f8450/fetchers/codeforces.js#L56

therefore one can solve it by lowercasing everything before comparison

victorsenam commented 6 years ago

Old handles are still not lowercased, right? We can let them break, we can manually lowercase the whole database (sounds reasonable) or we should check if there's some case insensitive version of "has" (unlikely).

gabrielrussoc commented 6 years ago

We could change the database but we can always just lowercase whenever we need to compare them.

victorsenam commented 6 years ago

One solution removes the need for the other. But if you wanna do it I don't mind.

gabrielrussoc commented 6 years ago

i like yours go ahead

victorsenam commented 6 years ago

Tasks pending:

victorsenam commented 6 years ago

Supposed to be fixed, closing issue for now

gabrielrussoc commented 6 years ago

as noted in #37, we are assuming the handles are lowercased on the database, but they are not

mikaelmello commented 6 years ago

Confirming that it is working now, all handles were correctly displayed in the last round (964)