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
I checked the code of packages/rocketchat-ui-message/client/messageBox.js
The usersTyping() methods in this file shows :
let last = users.pop();
if (users.length > 4) {
last = t('others');
}
let usernames = users.join(', ');
usernames = [usernames, last];
return {
multi: true,
selfTyping: MsgTyping.selfTyping.get(),
users: usernames.join(` ${ t('and') } `)
};
This code means displaying username is typing... when some users is typing above the text box.
It displays username1 is typing when a person is typing and it also displays username1, username2 and username3 are typing when 3 persons is typing.
However, I'm wondering if this code is better in the case that many people is typing because this code use pop() methods only 1 time.
This code maybe indicate that only the name of last person change to others therefore it is caused that displaying like username1, username2, ..., username99 and others are typing when many people like a hundreds are typing.
Server Setup Information:
Operating System: CentOS 7
Deployment Method(snap/docker/tar/etc): from source
Number of Running Instances: 1
Node Version: 4
Steps to Reproduce:
some people more than 5 persons open RocketChat and join same room.
all of them in the room type the message in the same time.
Expected behavior:
The word of username1, username2 and others are typing... is displayed.
Actual behavior:
The word of username1, username2, username3, username4 and others are typing... is displayed in the case that 5 persons are typing.
The text was updated successfully, but these errors were encountered:
It limits the number of usernames shown above the textbox when people
are typing.
If the number of typing users isn't greater than 4, then the text will
show all usernames:
`username1, username2, username3 and username4 are typing`
But, if the number of typing users is greater than 4, then the last
username will be replaced by `others`, like this:
`username1, username2, username3 and others are typing`
The number 4 was chosen because it was already in the code
vinade
added a commit
to vinade/Rocket.Chat
that referenced
this issue
Oct 24, 2018
It limits the number of usernames shown above the textbox when people
are typing.
If the number of typing users isn't greater than 4, then the text will
show all usernames:
`username1, username2, username3 and username4 are typing`
But, if the number of typing users is greater than 4, then the last
username will be replaced by `others`, like this:
`username1, username2, username3 and others are typing`
The number 4 was chosen because it was already in the code
Description:
I checked the code of
packages/rocketchat-ui-message/client/messageBox.js
The usersTyping() methods in this file shows :
This code means displaying
username is typing...
when some users is typing above the text box.It displays
username1 is typing
when a person is typing and it also displaysusername1, username2 and username3 are typing
when 3 persons is typing.However, I'm wondering if this code is better in the case that many people is typing because this code use pop() methods only 1 time.
This code maybe indicate that only the name of last person change to
others
therefore it is caused that displaying likeusername1, username2, ..., username99 and others are typing
when many people like a hundreds are typing.Server Setup Information:
Steps to Reproduce:
Expected behavior:
The word of
username1, username2 and others are typing...
is displayed.Actual behavior:
The word of
username1, username2, username3, username4 and others are typing...
is displayed in the case that 5 persons are typing.The text was updated successfully, but these errors were encountered: