Stop loading default chat room initally for those outside of beta #5338
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@deetergp, please review when you get the chance
CC: @yuwenmemon
Details
There was an edge case we didn't consider when putting default rooms behind betas. If a domain has a
domainAll
room (which we make behind the scenes for domains that aren't in the defaultRooms beta) and a user gets created after that room is made, they will actually see that room when they first log in (i.e. it'll be their "last accessed chat report"). They should see the concierge chat first, but that chat will be created after their account is made (which happens after the domainAll room was made).This PR makes it so new users won't land on a default domainAll room the first time they log in. This also prevents users from seeing a default room if they aren't in the beta and somehow managed to open a default chat room (to stop other edge cases we might have missed.
Also this is relevant to N6, since we're likely to see a lot of new users sign up and use NewDot with this.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/177836
Tests
Same as Web QA, but done locally. I used
clitools.sh
for making the domain, admin account, and second account. To test a user being outside of the default rooms beta locally, I made this line false:App/src/libs/Permissions.js
Line 51 in 0e6fdbf
QA Steps
Tested On
Screenshots
Web
This is what it looks like now if you try to access a report by URL (11073 is a domainAll room)
Mobile Web
Same thing is a blank screen on mobile obviously, but users should never be able to see this report anyway without manually entering into the url like I did.