Fix wrong pattern when adding highlights from usercard
Proposed changes
Fix highlights added from UserCard not working when target user have display name
Types of changes
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation Update (if none of the other choices apply)
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
- [x] I have read the CONTRIBUTING doc
- [ ] I have added necessary documentation (if appropriate)
- [x] Any dependent changes have been merged
Please add a changelog entry in changelog-nightly.md. Can create 3.1.6.2000.
When checking the pattern we are comparing the lowercase displayname with the lowercase pattern. Do displayName and username ever vary other than capitalization?
When checking the pattern we are comparing the lowercase displayname with the lowercase pattern. Do displayName and username ever vary other than capitalization?
Yes, especially for non-native English speakers. We often set our display name in our native language, which can be completely different from our username.