-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-09-16][$250] mWeb - Chat - In contacts a random guest user is displayed after login via public room link #47806
Comments
Triggered auto assignment to @CortneyOfstad ( |
@CortneyOfstad FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
Edited by proposal-police: This proposal was edited at 2023-10-07T14:32:22Z. ProposalPlease re-state the problem that we are trying to solve in this issue.In contacts, a random guest user is displayed after login via public room link What is the root cause of that problem?When opening a public room as an anonymous user, the session data is:
and we create a personal detail for it:
and after signing, we do not clear these data, so these data appear in contact list. What changes do you think we should make in order to solve the problem?
function removeAnonFromPersonalDetails() {
const anonAccountIDs = Object.values(personalDetails).filter((detail) => detail?.login?.includes('@expensify.anon'));
const data = anonAccountIDs.reduce((res, detail) => ({...res, [detail.accountID]: null}), {});
Onyx.merge(ONYXKEYS.PERSONAL_DETAILS_LIST, data);
} and call it in:
What alternative solutions did you explore? (Optional)
Can use useEffect: const isAnonymousUser = session?.authTokenType === CONST.AUTH_TOKEN_TYPES.ANONYMOUS;
const prevIsAnonymousUser = usePrevious(isAnonymousUser);
useEffect(() => {
if (prevIsAnonymousUser && !isAnonymousUser) {
removeAnonFromPersonalDetails();
}
}, [prevIsAnonymousUser, isAnonymousUser]);
Can cleanup the anon personal details when the sign in API is called successfully, such as in: App/src/libs/actions/Session/index.ts Line 520 in f12c1ff
and App/src/libs/actions/Session/index.ts Line 588 in f12c1ff
|
I am confused by the steps, as it specifically mentions The contact was not added to the chat, but rather a suggestion. And this is by design. @lanitochka17 does the tester recognize that email in any capacity in regards to Expensify or testing within Expensify? |
@CortneyOfstad
Then when signing in, the above random user data is not cleared, so it is displayed in the contact list. |
Thank you @dominictb for the clarification! I am having trouble recreating this, so I am going to have this retest by QA 👍 |
Job added to Upwork: https://www.upwork.com/jobs/~0148f0358fba85f9ac |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
@CortneyOfstad Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@dominictb's proposal LGTM! I think cleaning up on the API success callback seems the neatest way to do this as we can then pass the accountID to clear from the session data. Happy to listen to arguments otherwise if I've missed anything! 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @dangrous, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Yeah updating it in the success data makes sense to me, then we already know which account ID to remove. |
📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @dominictb 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR is still being reviewed! |
@dominictb @jjcoffee can you please take a look at #48715 to see if it is related to your changes? It was found while executing #48144 |
Issue not reproducible during KI retests. (First week) |
Bumping Ben's message above - @jjcoffee I think you were looking into this:
It looks like these are probably related issues |
I can't repro after reverting the changes from the PR, so I don't think it's related. |
I can reproduce that bug in prod, so I think it is not related to PR, because it is not deployed to prod. |
Looks like the automation failed again! This hit production 2024-09-09, so this should be held for payment 2024-09-16. cc @CortneyOfstad |
Thanks @jjcoffee! |
Issue not reproducible during KI retests. (Second week) |
Payment Summary@jjcoffee — paid $250 via Upwork |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.22
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
In contacts, a random guest user must not be displayed after login via public room link
Actual Result:
In contacts, a random guest user is displayed after login via public room link
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6578301_1724253847611.screenrecorder-2024-08-21-15-17-35-544_compress_1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @jjcoffeeThe text was updated successfully, but these errors were encountered: