Conversation
sampaiodiego
left a comment
There was a problem hiding this comment.
still need a deeper review. but already added a few comments.
| 'rocketchat:ui' | ||
| ]); | ||
|
|
||
| api.addFiles('client/rocketchat.js'); |
There was a problem hiding this comment.
please use more concise file names.. for this one I would chose either userStatus.js or startup.js
| //find | ||
| findByName(name, options) { | ||
| const query = { | ||
| $or: [ |
There was a problem hiding this comment.
you don't need a $or operator to only one condition
| findByNameExceptID(name, except, options) { | ||
| const query = { | ||
| _id: { $nin: [ except ] }, | ||
| $or: [ |
There was a problem hiding this comment.
same as above, you don't need a $or operator to only one condition
| FlowRouter.route('/admin/user-status-custom', { | ||
| name: 'user-status-custom', | ||
| subscriptions(/*params, queryParams*/) { | ||
| this.register('CustomUserStatus', Meteor.subscribe('CustomUserStatus')); |
There was a problem hiding this comment.
I would to use template level subscriptions instead of router level subscriptions, but I was not even able to find the CustomUserStatus .. is this valid?
| buttonTitle: t('Update'), | ||
| buttonAction: () => { | ||
| return () => { | ||
| const elText = jQuery('input[type=text][name=custom-status]')[0]; |
| RocketChat.callbacks.run('userStatusManuallySet', e.currentTarget.dataset.id); | ||
| popover.close(); | ||
| }, | ||
| 'click [data-type="open"]'(e) { |
|
@Hudell Can you add screenshots of this? |
|
Why not a page under “My Account” where you can add custom user statuses and then show them in the dropdown in addition to the default ones. Would look a lot cleaner I think :) |
|
The PR actually includes a page like that, but on the admin settings. That way admins can register new custom status for everybody to use. I hadn't thought of doing the same on the user level, but it could be interesting. |
|
Closed in favor of #13933 |

Closes #2422
Closes #11403
@RocketChat/core
This PR adds a "Custom User Status" option to the admin page, where an admin can register any number of custom User Statuses, choosing a name and type (online, away, busy or offline).
The type will be the actual status of the user, but the custom status name will be displayed next to the user's name as well.
Users will also be able to write their own custom status text.