Skip to content

Commit

Permalink
Merge pull request #45370 from dominictb/fix/41780-leave-room
Browse files Browse the repository at this point in the history
fix: allow user to stay in room report screen
  • Loading branch information
carlosmiceli authored Jul 16, 2024
2 parents c7d7bf4 + 6e10dc9 commit ea49b19
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2742,6 +2742,12 @@ function leaveRoom(reportID: string, isWorkspaceMemberLeavingWorkspaceRoom = fal
};

API.write(WRITE_COMMANDS.LEAVE_ROOM, parameters, {optimisticData, successData, failureData});

// If this is the leave action from a workspace room or chat thread, simply dismiss the modal, i.e., allow the user to view the room/thread and join again immediately.
if (isWorkspaceMemberLeavingWorkspaceRoom || isChatThread) {
return;
}
// In other cases, the report is deleted and we should move the user to another report.
navigateToMostRecentReport(report);
}

Expand Down

0 comments on commit ea49b19

Please sign in to comment.