[HOLD] [$500] Android/IOS - Chat - User's avatar is displayed as default avatar instead of selected avatar for the first time chatting
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Create a new account
- Launch the app
- On search start looking for a user who has picture on avator
- Create a chat with him/her
- Send message to the user
- Go back to LHN
- Tap Avatar - Settings - Log out
- Log in with the same account
Expected Result:
User's avatar should displayed in search result
Actual Result:
User's avatar is displayed as default avatar instead of selected avatar for the first time chatting
Workaround:
Unknown
Platform:
Where is this issue occurring?
- iOS
- Android
Version Number: 1.1.71.2
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers): any new account
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/93399543/172632853-66ae217c-2058-41f9-92c7-a2d1452130ef.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Exploratory
Slack conversation:
Triggered auto assignment to @TomatoToaster (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Alright this is a very unusual bug, definitely seems appropriate for External.
Triggered auto assignment to @kadiealexander (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Posted to Upwork!
https://www.upwork.com/jobs/~0115a6e56725bcd8a4 https://www.upwork.com/ab/applicants/1534735352512892928/job-details
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (Exported)
Triggered auto assignment to @mountiny (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Price doubled! Get 'em in!
Proposal
Issue
On web, Report.fetchChatReportsByIDs gets called in the ReportActionsView file. On mobile, it's not getting called. As such, the thumbnails aren't getting updated.
Solution
Replace the following: https://github.com/Expensify/App/blob/ad72b525c35b8630481e66875400bd272f34fd95/src/pages/home/report/ReportActionsView.js#L133-L135 To:
Report.fetchChatReportsByIDs([this.props.reportID], true);
This makes sure that we're always fetching the chat reports on initial mount.
Result
https://user-images.githubusercontent.com/30054992/174314848-1f49bc08-e7e3-4f79-9fb3-32c2a1d0cadf.mp4
I don't think https://github.com/Expensify/App/blob/ad72b525c35b8630481e66875400bd272f34fd95/src/pages/home/report/ReportActionsView.js#L133-L135 is used for this purpose.
Hmm, What about the call that we make when the user selects a report on SearchPage Report.fetchOrCreateChatReport?
That doesn’t return participant details.
On Fri, 17 Jun 2022 at 8:11 PM, Rajat Parashar @.***> wrote:
Hmm, What about the call that we make when the user selects a report on SearchPage Report.fetchOrCreateChatReport?
— Reply to this email directly, view it on GitHub https://github.com/Expensify/App/issues/9355#issuecomment-1158968778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHFJUUEBANZJNNAOEW3NCIDVPSIRBANCNFSM5YGTRCGQ . You are receiving this because you commented.Message ID: @.***>
I think that should be it. It should return the participant details as well. @mountiny What do you say? Report.fetchOrCreateChatReport API is called when user creates a new Chat either from NewChat page or the Search Page. Should this return the participant details as well?
I don't have much idea of the backend here.
@parasharrajat If we go forward with changing the API, we'll still need to change the fetchOrCreateChatReport function so that it merges the participant details to the onyx key named personalData.
Hmm, i havent been able to look jnto this tight now, but that would mean this problem has been around for a while. Are we sure this is a bug which was here for a long time? There are couple of the avatar related problems recently so i am curious if they do not have connection.
@mountiny I don't think that this is a bug in API. Adding participantDetails to the fetchOrCreateChatReport function response is more of a feature request than a bug. It was never there as far as I can see. @parasharrajat Correct me please if I'm wrong.
Alright, we are currently working on a big refactoring of the API and I have noted this problem in the relevant document and the person working on it cc @stitesExpensify. This is a low-priority issue and I think we should put it on HOLD until the refactorings are done and ideally include this fix in the refactorings.
The compensations for reporting and for a correct proposal we will use to fix this would obviously be paid out.
Not overdue, on hold for the refactorings. Making it monthly.
Issue not reproducible during KI retests. (First week)
Issue not reproducible during KI retests. (Second week)
@kadiealexander Could you please take the job off from Upwork? Seems like this has been fixed with some of the refactorings I guess.
It had automatically closed anyway. Should I close this issue?