Implement calling contacts into your current channel

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Max Brunsfeld 2023-08-15 14:56:54 -07:00
parent 943aeb8c09
commit 1ffde7bddc
8 changed files with 187 additions and 87 deletions

View file

@ -494,14 +494,9 @@ test_both_dbs!(
)
.await
.unwrap();
db.join_room(
room_id,
user2.user_id,
None,
ConnectionId { owner_id, id: 1 },
)
.await
.unwrap();
db.join_room(room_id, user2.user_id, ConnectionId { owner_id, id: 1 })
.await
.unwrap();
assert_eq!(db.project_count_excluding_admins().await.unwrap(), 0);
db.share_project(room_id, ConnectionId { owner_id, id: 1 }, &[])
@ -1113,12 +1108,7 @@ test_both_dbs!(
// can join a room with membership to its channel
let joined_room = db
.join_room(
room_1,
user_1,
Some(channel_1),
ConnectionId { owner_id, id: 1 },
)
.join_room(room_1, user_1, ConnectionId { owner_id, id: 1 })
.await
.unwrap();
assert_eq!(joined_room.room.participants.len(), 1);
@ -1126,12 +1116,7 @@ test_both_dbs!(
drop(joined_room);
// cannot join a room without membership to its channel
assert!(db
.join_room(
room_1,
user_2,
Some(channel_1),
ConnectionId { owner_id, id: 1 }
)
.join_room(room_1, user_2, ConnectionId { owner_id, id: 1 })
.await
.is_err());
}