Skip to content
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

Starting a chat with a new user show as a group chat in the header #38965

Closed
1 of 6 tasks
m-natarajan opened this issue Mar 25, 2024 · 5 comments
Closed
1 of 6 tasks

Starting a chat with a new user show as a group chat in the header #38965

m-natarajan opened this issue Mar 25, 2024 · 5 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@m-natarajan
Copy link

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: 1.4.56-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @youssef-lr
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1711087497811689

Action Performed:

Start a chat with a new user
Send a message

Expected result:

The chat header should display a single user

Actual result:

The chat header displays the header of a group chat, containing both participants emails

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Screen.Recording.2024-03-22.at.05.36.39.mov
Recording.2897.mp4

View all open jobs on GitHub

@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 25, 2024
Copy link

melvin-bot bot commented Mar 25, 2024

Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@nexarvo
Copy link
Contributor

nexarvo commented Mar 25, 2024

It Seems like backend. We are getting 2 participantAccountIDs in AddComment API but the API should send only one participantID:
Screenshot 2024-03-26 at 4 29 01 AM

We are using these for determining the title/ Avatar for HeaderView:

const title = ReportUtils.isGroupChat(report) ? getGroupChatName(report, true) : ReportUtils.getReportName(reportHeaderData);

 
We are checking for multiple participantAccountIDs in isGroupChat function hence it determines it as group chat and how 2 users in title. Same in the case with side bar chat title and avatars.

App/src/libs/ReportUtils.ts

Lines 5193 to 5203 in b25eb15

function isGroupChat(report: OnyxEntry<Report>): boolean {
return Boolean(
report &&
!isChatThread(report) &&
!isTaskReport(report) &&
!isMoneyRequestReport(report) &&
!isArchivedRoom(report) &&
!Object.values(CONST.REPORT.CHAT_TYPE).some((chatType) => chatType === getChatType(report)) &&
(report.participantAccountIDs?.length ?? 0) > 1,
);
}

 

Note

When we switch report and open this Report again it correctly shows only one participant as we get only one participantAccountIDs in OpenReport API

@melvin-bot melvin-bot bot added the Overdue label Apr 1, 2024
@JmillsExpensify
Copy link

I think this is an artifact of the on-going group chat migration and implementation. @marcaaron Does that sound right?

@melvin-bot melvin-bot bot removed the Overdue label Apr 3, 2024
@JmillsExpensify
Copy link

Feel free to close if we already have an existing issue, or this will be resolved following implementation.

@marcaaron
Copy link
Contributor

Yep, working on this here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
None yet
Development

No branches or pull requests

4 participants