You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compare old and new username colors for example for userid "@sometest:matrix.org".
Outcome
What did you expect?
Username colors staying the same
What happened instead?
Username colors changed drastically
As mention in another issue:
My color is completely different now and in conversations I always think I've a new message.
Especially confusing is that a friend has now a similar color I had before and I have now a color he had before.
Blue just became purple and purple became blue for example...
I always think I got a new message cause I got used to my color...
The reason is that the hashcode way that was implemented before worked differently.
(I still hope that there will be a way to set a custom color someday... (for everyone to see))
I think the old way was better cause it prevented someone with "misspelled" username to impersonate someone else. The new way produces the same color no matter in what order the letters are:
What makes me believe that this is a bug is that the name of the function doesn't do what it suggests:
The new way produces the same color no matter in what order the letters are:
Fair, but this isn't a requirement for a hash function to be a valid function.
I didn't count that as a requirement for a hash function and I agree that summing up the char codes is some kind of "hash" aswell (even a very poor man one). It just felt like it was meant to be implemented the same way but somehow the part about the "ORing" which made the result less predictable (and yes, I know that is not a requirement for a hash aswell) got removed.
Steps to reproduce
Compare old and new username colors for example for userid "@sometest:matrix.org".
Outcome
What did you expect?
Username colors staying the same
What happened instead?
Username colors changed drastically
As mention in another issue:
My color is completely different now and in conversations I always think I've a new message.
Especially confusing is that a friend has now a similar color I had before and I have now a color he had before.
Blue just became purple and purple became blue for example...
I always think I got a new message cause I got used to my color...
The reason is that the hashcode way that was implemented before worked differently.
(I still hope that there will be a way to set a custom color someday... (for everyone to see))
I think the old way was better cause it prevented someone with "misspelled" username to impersonate someone else. The new way produces the same color no matter in what order the letters are:
What makes me believe that this is a bug is that the name of the function doesn't do what it suggests:
https://github.com/vector-im/compound-web/blob/1b0bf41cf7782db098eb67b9e4de683a2fb32eac/src/components/Avatar/useIdColorHash.ts#L23C20-L23C20
It's not using a "hash" anymore. The function that got removed instead used a hash to do that:
matrix-org/matrix-react-sdk@e3df662#diff-1f693496f32ed3d0423cbc77412a1febdd04e3b0983a98ef06f8cd81262c8f9dL83
I think this is related to
#26042
Operating system
Windows
Application version
started with v1.11.41
How did you install the app?
No response
Homeserver
No response
Will you send logs?
No
The text was updated successfully, but these errors were encountered: