Allow inviting users to a project that was shared by someone else

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-10-13 18:48:14 +02:00
parent f5db02a605
commit b8bc5a282e
2 changed files with 26 additions and 4 deletions

View file

@ -374,9 +374,7 @@ impl Room {
project: ModelHandle<Project>,
cx: &mut ModelContext<Self>,
) -> Task<Result<u64>> {
if project.read(cx).is_remote() {
return Task::ready(Err(anyhow!("can't share remote project")));
} else if let Some(project_id) = project.read(cx).remote_id() {
if let Some(project_id) = project.read(cx).remote_id() {
return Task::ready(Ok(project_id));
}