[IMPROVE] Typing indicators now use Real Names#11164
Merged
ggazzo merged 5 commits intoRocketChat:developfrom Jul 19, 2018
Merged
[IMPROVE] Typing indicators now use Real Names#11164ggazzo merged 5 commits intoRocketChat:developfrom
ggazzo merged 5 commits intoRocketChat:developfrom
Conversation
karlprieb
suggested changes
Jun 20, 2018
| } | ||
| }); | ||
| if (user != null && user.username === username) { | ||
| if (user != null && (user.username === username || (useRealNames() && (user.name === username)))) { |
Contributor
There was a problem hiding this comment.
Why did you create a function called userRealNames if you use only one time? Why no put RocketChat.settings.get('UI_Use_Real_Name') directly on this if instead?
| }; | ||
|
|
||
| const shownName = function(user) { | ||
| if (useRealNames()) { |
Contributor
There was a problem hiding this comment.
Same here, just use RocketChat.settings.get('UI_Use_Real_Name')
Contributor
Author
|
@karlprieb That should do :---) |
karlprieb
previously approved these changes
Jun 25, 2018
mrsimpson
suggested changes
Jul 13, 2018
| } | ||
| const user = Meteor.user(); | ||
| return RocketChat.Notifications.notifyRoom(room, 'typing', user && user.username, false); | ||
| return RocketChat.Notifications.notifyRoom(room, 'typing', shownName(user), false); |
Contributor
There was a problem hiding this comment.
@vynmera this broke the notifications in some cases.
Sometimes, user is missing completely - I believe if nobody is typing.
The earlier user && ... would evaluate to false, not notifying the stream - this was intended. Please restore this before merging
Contributor
Author
|
@mrsimpson Should be fixed :) |
mrsimpson
previously approved these changes
Jul 17, 2018
Merged
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of an attempt to improve #11145
If the admin has "Use Real Name" on, typing indicators now show the real name, making life a lot easier for those who auto-generate usernames or otherwise have usernames that don't correlate with the user.
Before, or with "Use Real Name" off

After, with "Use Real Name" on

Enjoy!