Fix duplicate chats being created#21265
Conversation
| participantsloginList.sort(); | ||
| return _.find(allReports, (report) => { | ||
| // If the report has been deleted, or there are no participants (like an empty #admins room) then skip it | ||
| if (!report || !report.participants || isThread(report)) { |
There was a problem hiding this comment.
Could we add !isUserCreatedPolicyRoom(report) to this early return too instead of doing the check below?
There was a problem hiding this comment.
I would just keep it as it is as we're partially reverting this commit 73cdf02#diff-65c096044d5f69b35bcdec14c99c4fda4580759df9b1a7c36650d58eea276f1dR1890
Update comment Co-authored-by: Carlos Martins <cmartins@expensify.com>
|
@aldo-expensify Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
|
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromechrome.movMobile Web - Safarisafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
…sify/App into monil-updateGetChatsByParticipants
26bbe59
…ipants Fix duplicate chats being created (cherry picked from commit 00f6216)
…-21265 🍒 Cherry pick PR #21265 to staging 🍒
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 1.3.30-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.30-5 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.31-3 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.31-3 🚀
|
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.32-1 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.32-5 🚀
|
Details
We are trying to retrieve existing reports by using participants accountID's, but we have no way to bridge the gap between email and accountID's. As a result, we are never able to find an exisiting chat.
While we're migrating, let's use logins/emails to find existing chat
Fixed Issues
https://expensify.slack.com/archives/C05E4M0QHLY/p1687356357691559
$ GH_LINK
PROPOSAL: #21184
Tests
DM
+and new chat and enter completely new email+and type the same emailGroup
+and new group and enter two completely new email+and new group and type the same emailsProfile
Offline tests
Same
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Screen.Recording.2023-06-22.at.2.19.06.AM.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
Screen.Recording.2023-06-22.at.2.22.44.AM.mov
iOS
Android