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

[FIX] Custom status fixes #14853

Merged
merged 15 commits into from
Jun 27, 2019
Merged

Conversation

wreiske
Copy link
Contributor

@wreiske wreiske commented Jun 22, 2019

Here are some fixes for the status message presence issues and other cleanup related to #13933

Added statusText to several api endpoints
Changed statusMessage to statusText since that is what it is called everywhere
@geekgonecrazy geekgonecrazy added this to the 1.2.0 milestone Jun 22, 2019
@wreiske
Copy link
Contributor Author

wreiske commented Jun 22, 2019

image

  • Setting status with /status slash command is restricted to the edit-other-user-info permission.
  • Fix the above screenshot issues

@wreiske
Copy link
Contributor Author

wreiske commented Jun 22, 2019

There's still some serious weirdness here... if someone is offline and you look at their page, the top nav bar will show "offline" but the user info will actually show the correct status.

image

I'm 💤 and this code makes me 🤢 so, hopefully, someone else can take a peek and figure out what's going wrong.

@sampaiodiego sampaiodiego modified the milestones: 1.2.0, 1.2.0-rc.1 Jun 24, 2019
Hudell
Hudell previously approved these changes Jun 24, 2019
@wreiske
Copy link
Contributor Author

wreiske commented Jun 24, 2019

@Hudell the top header still shows "offline" even though the status is set to "on vacation, I'll be back 7/1"
image

I test by having multiple rocket.chat accounts logged in locally (one in chrome, one in rocket.chat app, or even a third incognito or in another browser like firefox.) Try testing changing statuses on different clients with different accounts and see how they react.

  1. Have two users logged in
  2. User 1 changes status to "on vacation" and then logs out or closes Rocket.
  3. User 2 see's the user is offline (the circle is grayed out) and the status shows "on vacation".
  4. User 2 refreshes the browser and only sees "offline" in the header for user 1's status, however, the user side tab shows the correct status.

@Hudell
Copy link
Contributor

Hudell commented Jun 24, 2019

Ah, that's right. When you refresh, the client's User collection is empty so it doesn't have information about offline users. The user panel knows the right status because it loads the user data.

I'll see what I can do to fix this.

@Hudell Hudell dismissed their stale review June 24, 2019 22:59

There's one more issue

@wreiske
Copy link
Contributor Author

wreiske commented Jun 24, 2019

Ah, that's right. When you refresh, the client's User collection is empty so it doesn't have information about offline users. The user panel knows the right status because it loads the user data.

I'll see what I can do to fix this.

I was looking at how the side panel does it,

this.subscribe('fullUserData', username, 1, () => this.loadingUserInfo.set(false));

but then thought maybe it would be better to use the subscription API to pull it? I'll let you fix it! I've got other things to work on. Thanks!

…s text when it is not found on the internal collection
@wreiske
Copy link
Contributor Author

wreiske commented Jun 26, 2019

@Hudell WIth the latest fixes, there seems to be an issue when changing the status to one of the pre-defined custom statuses.

image

If I click on "Out To Lunch" which should make me away, and then select "In a meeting" that should make me busy, it only changes me to busy and doesn't change the status to "in a meeting."

We should be able to change to one of the default statuses (offline, away, busy, online...) no matter what the current status text is.

If my status is "Working on some cool stuff" and I initially set it to "busy", I should be able to change my "busy" to "online' without my status changing.

If my status is "PTO (out of office, PTO)" I should be able to then change it to a pre-defined status of "In A Meeting" and it should change to the pre-defined status, HOWEVER, if I just click on "online" instead of "away", my status should stay "PTO" until I manually change it to something else.

@Hudell
Copy link
Contributor

Hudell commented Jun 26, 2019

I was unable to replicate the problem here. All status changes worked fine for both text and presence.

@wreiske
Copy link
Contributor Author

wreiske commented Jun 26, 2019

I was unable to replicate the problem here. All status changes worked fine for both text and presence.

Yup! I can't reproduce it either after a fresh install. Weird. Maybe I was in a weird state?... I say this commit is good to go!!!! 👍 Thanks for all the help getting status messages merged. Woo!! 🚀 @Hudell @sampaiodiego

Hudell
Hudell previously approved these changes Jun 27, 2019
zdumitru
zdumitru previously approved these changes Jun 27, 2019
@Hudell Hudell dismissed stale reviews from zdumitru and themself via 6dd129a June 27, 2019 13:45
@sampaiodiego sampaiodiego merged commit 24ebd2c into RocketChat:develop Jun 27, 2019
@sampaiodiego sampaiodiego mentioned this pull request Jun 28, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants