App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD] [$500] Android/IOS - Chat - User's avatar is displayed as default avatar instead of selected avatar for the first time chatting

Open kbecciv opened this issue 4 years ago • 21 comments

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

  1. Launch the app
  2. On search start looking for a user who has picture on avator
  3. Create a chat with him/her
  4. Send message to the user
  5. Go back to LHN
  6. Tap Avatar - Settings - Log out
  7. 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:

View all open jobs on GitHub

kbecciv avatar Jun 08 '22 13:06 kbecciv

Triggered auto assignment to @TomatoToaster (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

melvin-bot[bot] avatar Jun 08 '22 13:06 melvin-bot[bot]

Alright this is a very unusual bug, definitely seems appropriate for External.

TomatoToaster avatar Jun 08 '22 19:06 TomatoToaster

Triggered auto assignment to @kadiealexander (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

melvin-bot[bot] avatar Jun 08 '22 19:06 melvin-bot[bot]

Posted to Upwork!

https://www.upwork.com/jobs/~0115a6e56725bcd8a4 https://www.upwork.com/ab/applicants/1534735352512892928/job-details

kadiealexander avatar Jun 09 '22 03:06 kadiealexander

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (Exported)

melvin-bot[bot] avatar Jun 09 '22 03:06 melvin-bot[bot]

Triggered auto assignment to @mountiny (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Jun 09 '22 03:06 melvin-bot[bot]

Price doubled! Get 'em in!

kadiealexander avatar Jun 17 '22 02:06 kadiealexander

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

allroundexperts avatar Jun 17 '22 14:06 allroundexperts

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?

parasharrajat avatar Jun 17 '22 15:06 parasharrajat

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: @.***>

allroundexperts avatar Jun 17 '22 15:06 allroundexperts

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 avatar Jun 17 '22 17:06 parasharrajat

@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.

allroundexperts avatar Jun 17 '22 19:06 allroundexperts

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 avatar Jun 17 '22 21:06 mountiny

@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.

allroundexperts avatar Jun 17 '22 21:06 allroundexperts

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.

mountiny avatar Jun 17 '22 22:06 mountiny

Not overdue, on hold for the refactorings. Making it monthly.

mountiny avatar Jun 27 '22 10:06 mountiny

Issue not reproducible during KI retests. (First week)

mvtglobally avatar Jul 19 '22 03:07 mvtglobally

Issue not reproducible during KI retests. (Second week)

mvtglobally avatar Jul 26 '22 03:07 mvtglobally

@kadiealexander Could you please take the job off from Upwork? Seems like this has been fixed with some of the refactorings I guess.

mountiny avatar Jul 26 '22 09:07 mountiny

It had automatically closed anyway. Should I close this issue?

kadiealexander avatar Jul 27 '22 00:07 kadiealexander