This repository was archived by the owner on Sep 11, 2024. It is now read-only.
replace user id with displayname and add type to diffs#7781
Closed
chagai95 wants to merge 2 commits into
Closed
Conversation
t3chguy
suggested changes
Feb 11, 2022
| if (!Number.isInteger(to)) { | ||
| to = currentUserDefault; | ||
| } | ||
| const displayName = MatrixClientPeg.get().getUser(userId).displayName; |
Member
There was a problem hiding this comment.
Displaynames are per-room, not global, so you can't use the displayName of getUser in a room. You'll need to get the room member instead
Comment on lines
+515
to
+516
| _t('%(displayName)s from %(fromPowerLevel)s to %(toPowerLevel)s', { | ||
| displayName: diff.displayName, |
Member
There was a problem hiding this comment.
You need to run the i18n script to regen the i18n files
Member
|
Hello @chagai95 are you able to iterate on this PR based on the feedback? Thanks |
Contributor
Author
Hey, I should be able to, thx for the ping, I'll try getting around to this very soon. |
Contributor
|
Superseded by #9295 |
Member
|
Closing in favour of #9295 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes element-hq/element-web#3969
Makes more sense to show the display name and not the user ID, I think.
Translation string needs to be changed for this as well:
https://translate.element.io/translate/element-web/matrix-react-sdk/en/?checksum=5db8fd2d99ec50a6
I could not figure it out, or I don't have the rights to change it.


Before:
After:
Signed-off-by: Chagai Friedlander chagai95@gmail.com
Here's what your changelog entry will look like:
✨ Features
Preview: https://pr7781--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.