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] Avoid Invalid User Exception when entering direct chat while not authenticated #21735 #1

Merged
merged 1 commit into from
Jul 20, 2021

Conversation

vachigaggl
Copy link
Owner

Solves errors being shown to user when creating direct chat by directly navigating to URL RocketChat#21735

Proposed changes (including videos or screenshots)

Avoid "Invalid User Exception" and "No user with username..." being displayed to user as shown in this embedded gif when entering direct chat with no session present:
image

Issue(s)

RocketChat#21735

Steps to test or reproduce fix

  1. Use iframe authentication (not sure this is a must)
  2. Directly navigate to a URL like /direct/W5xxxxxxxxQD?layout=embedded (W5xxxxxxxxQD is the room id of an existing room) -OR- (Variant B) Directly navigate to a URL /direct/Christof_Teng?layout=embedded where Christof_Teng is a username
  3. Red error notification "Invalid User" is no longer displayed
  4. "No user with username "W5xxxxxxxxQD" was found! is no longer briefly shown" -OR- (Variant B) "No user with username "Christof_Teng" was found!" is no longer briefly shown
  5. The chatroom loads
  6. search for getRoomByTypeAndName in javascript console. You will find that there are 2 calls, the first one fails, but the error caused by the first call is no longer shown to user.

Further comments

The video above shows the myriad of errors that were displayed to the user when loading a direct chat when using iframe authentication. This fix shows the loading screen until successful render of the direct chat.

Solves errors being shown to user when creating direct chat by directly navigating to URL RocketChat#21735
@vachigaggl vachigaggl merged commit b74d873 into develop Jul 20, 2021
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.

1 participant