Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Custom User Status #13933

Merged
merged 85 commits into from
Jun 21, 2019
Merged

[NEW] Custom User Status #13933

merged 85 commits into from
Jun 21, 2019

Conversation

Hudell
Copy link
Contributor

@Hudell Hudell commented Mar 28, 2019

This PR merges together the implementations of custom user status on two different PRs: #12710 (by @wreiske ) and #9353 (by me)

It adds the ability for admins to register additional user status and also for users to type in any custom message as their current status.

image

image

@@ -120,7 +119,7 @@ Template.headerRoom.helpers({
const statusText = roomTypes.getUserStatusText(roomData.t, this._id);

if (s.trim(statusText)) {
return emojione.render(s.escapeHTML(statusText));
return statusText;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a plan to add back support for rendering emojis in the status messages?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I just removed it now to make sure the PR is ready for the version cut, but I'll implement the new emoji renderer once I'm done with some other work I'm busy with.

tassoevan
tassoevan previously approved these changes Jun 21, 2019
wreiske
wreiske previously approved these changes Jun 21, 2019
@Hudell Hudell dismissed stale reviews from wreiske and tassoevan via f0692c4 June 21, 2019 20:39
@sampaiodiego sampaiodiego merged commit fbb47b6 into develop Jun 21, 2019
@sampaiodiego sampaiodiego deleted the custom_user_status branch June 21, 2019 21:56
@wreiske
Copy link
Contributor

wreiske commented Jun 21, 2019

🚀

This was referenced Jun 22, 2019
@sampaiodiego sampaiodiego mentioned this pull request Jun 28, 2019
Kailash0311 pushed a commit to WideChat/Rocket.Chat that referenced this pull request Jun 29, 2019
* Service Account broadcast room callback added

* Service Account Callback completed

* CLI errors fixed

* [NEW] Service Account one-tap login complete

* Callbacks modified

* Service Accounts directory tab added

* [NEW] Service Accounts Login method

* Typo fixed

* CLI errors fixed

* CLI errors fixed

* [FIX] Anonymous chat read (RocketChat#14717)

* Prevent errors when allowing anonymous read

* getSingleMessage for anonymous users

* Fix register user when allow read and write anonymous is enabled

* Fix anonymous with sidebar extended as default

Co-authored-by: ubergeekzone <ubergeekzone@gmail.com>

* [New] Service Account directory feature

* CLI errors fixed

* UsernameExists meteor method fixed

* Sync commit

* [NEW] Add loading animation to webdav file picker (RocketChat#14759)

* [NEW] Service Account subscription method added

* [NEW] Service account subscription sidenav type

* changed mongo version for snap from 3.2.7 to 3.4.20 (RocketChat#14838)

* add _hidden for messages loaded by thread (RocketChat#14837)

* Regression: thread loading parent msg if is not loaded (RocketChat#14839)

* [IMPROVE] Layout of livechat manager pages to new style (RocketChat#13900)

* [FIX] Removes E2E action button, icon and banner when E2E is disabled. (RocketChat#14810)

* [IMPROVE] Adds link to download generated user data file (RocketChat#14175)

* [FIX] Error when using Download My Data or Export My Data (RocketChat#14645)

* [NEW] Custom User Status (RocketChat#13933)

Co-Authored-By: Tasso Evangelista <tasso@tassoevan.me>
Co-Authored-By: Guilherme Gazzo <guilhermegazzo@gmail.com>
Co-Authored-By: wreiske <wreiske@mieweb.com>

* Allow debugging of cached collections by name (RocketChat#14859)

* Regression: Allow debugging of cached collections by name (RocketChat#14862)

* Regression: Fix desktop notifications not being sent (RocketChat#14860)

* Broadcast Room name change handled

* Lint errors fixed

* getLoginToken method refactored

* Console statements removed

* Sidebar header permission modified

* Merge branch service-accounts

* Added service account directory search translation key

* Subscribers count added

* [NEW] Service Account sidenav type

* Synced with base branch
Kailash0311 pushed a commit to WideChat/Rocket.Chat that referenced this pull request Jul 2, 2019
* [FIX] Load messages after disconnect and message box scroll missing (RocketChat#14668)

* Removing unnecesary federation configs (RocketChat#14674)

* [FIX] SAML login error. (RocketChat#14686)

* Bump version to 1.1.1

* Service Account broadcast room callback added

* Service Account Callback completed

* CLI errors fixed

* [NEW] Service Account one-tap login complete

* Callbacks modified

* Service Accounts directory tab added

* [NEW] Service Accounts Login method

* Typo fixed

* CLI errors fixed

* CLI errors fixed

* [FIX] Anonymous chat read (RocketChat#14717)

* Prevent errors when allowing anonymous read

* getSingleMessage for anonymous users

* Fix register user when allow read and write anonymous is enabled

* Fix anonymous with sidebar extended as default

Co-authored-by: ubergeekzone <ubergeekzone@gmail.com>

* [FIX] User Real Name being erased when not modified (RocketChat#14711)

* [FIX] User status information on User Info panel (RocketChat#14763)

* [FIX] Anonymous chat read (RocketChat#14717)

* Prevent errors when allowing anonymous read

* getSingleMessage for anonymous users

* Fix register user when allow read and write anonymous is enabled

* Fix anonymous with sidebar extended as default

Co-authored-by: ubergeekzone <ubergeekzone@gmail.com>

* Bump version to 1.1.2

* [New] Service Account directory feature

* CLI errors fixed

* UsernameExists meteor method fixed

* Sync commit

* [NEW] Add loading animation to webdav file picker (RocketChat#14759)

* [NEW] Service Account subscription method added

* changed mongo version for snap from 3.2.7 to 3.4.20 (RocketChat#14838)

* add _hidden for messages loaded by thread (RocketChat#14837)

* Regression: thread loading parent msg if is not loaded (RocketChat#14839)

* [IMPROVE] Layout of livechat manager pages to new style (RocketChat#13900)

* [FIX] Removes E2E action button, icon and banner when E2E is disabled. (RocketChat#14810)

* add _hidden for messages loaded by thread (RocketChat#14837)

* Regression: thread loading parent msg if is not loaded (RocketChat#14839)

* Bump version to 1.1.3

* [IMPROVE] Adds link to download generated user data file (RocketChat#14175)

* [FIX] Error when using Download My Data or Export My Data (RocketChat#14645)

* [NEW] Custom User Status (RocketChat#13933)

Co-Authored-By: Tasso Evangelista <tasso@tassoevan.me>
Co-Authored-By: Guilherme Gazzo <guilhermegazzo@gmail.com>
Co-Authored-By: wreiske <wreiske@mieweb.com>

* Bump version to 1.2.0-rc.0

* Allow debugging of cached collections by name (RocketChat#14859)

* Regression: Allow debugging of cached collections by name (RocketChat#14862)

* Regression: Fix desktop notifications not being sent (RocketChat#14860)

* Broadcast Room name change handled

* Lint errors fixed

* getLoginToken method refactored

* Console statements removed

* Sidebar header permission modified

* Merge branch service-accounts

* Added service account directory search translation key

* Subscribers count added

* [FIX] Custom status fixes (RocketChat#14853)

* Fixes for status message text presence issues
Added statusText to several api endpoints
Changed statusMessage to statusText since that is what it is called everywhere

* Fixed slash command for changing status

* Fixed the "name is required" issue

* Make sure the status is set blank if selecting a default status... we don't want an "online" status when someone is actually offline!

* Fixes display of custom status on the room header

* Changed the header of DM rooms to query the server for the user status text when it is not found on the internal collection

* Changed Custom Status methods to check if the user is logged in

* Improved code readability

* Fix getting status list before logging in

* Bump version to 1.2.0-rc.1

* [FIX] LinkedIn OAuth login (RocketChat#14887)

* [NEW] Show App bundles and its apps (RocketChat#14886)

* Bump version to 1.2.0-rc.2

* Bump version to 1.2.0

* Bump version to 1.3.0-develop

* [FIX] Not showing local app on App Details (RocketChat#14894)

* Unread counter added in popver

* Get linked service account method added
Kailash0311 pushed a commit to WideChat/Rocket.Chat that referenced this pull request Jul 2, 2019
* [FIX] Load messages after disconnect and message box scroll missing (RocketChat#14668)

* Removing unnecesary federation configs (RocketChat#14674)

* [FIX] SAML login error. (RocketChat#14686)

* Bump version to 1.1.1

* Service Account broadcast room callback added

* Service Account Callback completed

* CLI errors fixed

* [NEW] Service Account one-tap login complete

* Callbacks modified

* Service Accounts directory tab added

* [NEW] Service Accounts Login method

* Typo fixed

* CLI errors fixed

* CLI errors fixed

* [FIX] Anonymous chat read (RocketChat#14717)

* Prevent errors when allowing anonymous read

* getSingleMessage for anonymous users

* Fix register user when allow read and write anonymous is enabled

* Fix anonymous with sidebar extended as default

Co-authored-by: ubergeekzone <ubergeekzone@gmail.com>

* [FIX] User Real Name being erased when not modified (RocketChat#14711)

* [FIX] User status information on User Info panel (RocketChat#14763)

* [FIX] Anonymous chat read (RocketChat#14717)

* Prevent errors when allowing anonymous read

* getSingleMessage for anonymous users

* Fix register user when allow read and write anonymous is enabled

* Fix anonymous with sidebar extended as default

Co-authored-by: ubergeekzone <ubergeekzone@gmail.com>

* Bump version to 1.1.2

* [New] Service Account directory feature

* CLI errors fixed

* UsernameExists meteor method fixed

* Sync commit

* [NEW] Add loading animation to webdav file picker (RocketChat#14759)

* [NEW] Service Account subscription method added

* changed mongo version for snap from 3.2.7 to 3.4.20 (RocketChat#14838)

* add _hidden for messages loaded by thread (RocketChat#14837)

* Regression: thread loading parent msg if is not loaded (RocketChat#14839)

* [IMPROVE] Layout of livechat manager pages to new style (RocketChat#13900)

* [FIX] Removes E2E action button, icon and banner when E2E is disabled. (RocketChat#14810)

* add _hidden for messages loaded by thread (RocketChat#14837)

* Regression: thread loading parent msg if is not loaded (RocketChat#14839)

* Bump version to 1.1.3

* [IMPROVE] Adds link to download generated user data file (RocketChat#14175)

* [FIX] Error when using Download My Data or Export My Data (RocketChat#14645)

* [NEW] Custom User Status (RocketChat#13933)

Co-Authored-By: Tasso Evangelista <tasso@tassoevan.me>
Co-Authored-By: Guilherme Gazzo <guilhermegazzo@gmail.com>
Co-Authored-By: wreiske <wreiske@mieweb.com>

* Bump version to 1.2.0-rc.0

* Allow debugging of cached collections by name (RocketChat#14859)

* Regression: Allow debugging of cached collections by name (RocketChat#14862)

* Regression: Fix desktop notifications not being sent (RocketChat#14860)

* Broadcast Room name change handled

* Lint errors fixed

* getLoginToken method refactored

* Console statements removed

* Sidebar header permission modified

* Merge branch service-accounts

* Added service account directory search translation key

* Subscribers count added

* [FIX] Custom status fixes (RocketChat#14853)

* Fixes for status message text presence issues
Added statusText to several api endpoints
Changed statusMessage to statusText since that is what it is called everywhere

* Fixed slash command for changing status

* Fixed the "name is required" issue

* Make sure the status is set blank if selecting a default status... we don't want an "online" status when someone is actually offline!

* Fixes display of custom status on the room header

* Changed the header of DM rooms to query the server for the user status text when it is not found on the internal collection

* Changed Custom Status methods to check if the user is logged in

* Improved code readability

* Fix getting status list before logging in

* Bump version to 1.2.0-rc.1

* [FIX] LinkedIn OAuth login (RocketChat#14887)

* [NEW] Show App bundles and its apps (RocketChat#14886)

* Bump version to 1.2.0-rc.2

* Bump version to 1.2.0

* Bump version to 1.3.0-develop

* [FIX] Not showing local app on App Details (RocketChat#14894)

* Unread counter added in popver

* Get linked service account method added

* get cloud generated public key for marketplace licenses (RocketChat#14851)
@reetp reetp mentioned this pull request Jul 11, 2019
@reetp
Copy link

reetp commented Jul 11, 2019

Just been trying to change the status in open.rocket.chat but can't seem to do it reliably and cannot remove it to set back to default. Something is clearly broken in there.

Not sure whether to open a bug, add to PR #14853 or stay on this?

@Hudell
Copy link
Contributor Author

Hudell commented Jul 11, 2019

Since the PRs have already been merged, I think opening a new issue would be ideal.

@wreiske
Copy link
Contributor

wreiske commented Jul 11, 2019

This may be the issue:

export const setStatusText = RateLimiter.limitFunction(_setStatusText, 1, 60000, {

The change status server method is rate limited to once every 60 seconds.

@reetp
Copy link

reetp commented Jul 12, 2019

As we discovered, it isn't obvious.
Make a change, hit save, realise you made a typo, modify and save, and it stays the same. And you have no idea why.

@wreiske
Copy link
Contributor

wreiske commented Jul 12, 2019

@reetp if you wouldn't mind taking a minute to open up an issue, refencing that line, I'll get a pull request in to fix it.

Or, you can make a pull request! I would say once every 2 or 3 seconds to account for edits. I was surprised there wasn't any notification about the rate limiter being hit. No "please slow down" messages or anything in console about it hitting the rate limit... hmm. If you open an issue we can discuss what an appropriate rate limit would be for it.

@reetp
Copy link

reetp commented Jul 12, 2019

OK. Need some Zzzzz - Ill spin it up tomoz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants