single click channel (#7596)

- Open channel notes and chat on channel click
- WIP
- Fix compile error
- Don't join live kit until requested
- Track in_call state separately from in_room



Release Notes:

- Improved channels: you can now be in a channel without joining the
audio call automatically

**or**

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Conrad Irwin 2024-02-09 14:18:27 -07:00 committed by GitHub
parent 2b39a9512a
commit efe23ebfcd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 659 additions and 489 deletions

View file

@ -54,7 +54,7 @@ impl TestServer {
Ok(SERVERS
.lock()
.get(url)
.ok_or_else(|| anyhow!("no server found for url"))?
.ok_or_else(|| anyhow!("no server found for url: {}", url))?
.clone())
}
@ -160,7 +160,6 @@ impl TestServer {
async fn remove_participant(&self, room_name: String, identity: String) -> Result<()> {
// TODO: clear state associated with the `Room`.
self.executor.simulate_random_delay().await;
let mut server_rooms = self.rooms.lock();
let room = server_rooms
@ -414,6 +413,15 @@ struct TestServerRoom {
participant_permissions: HashMap<Sid, proto::ParticipantPermission>,
}
impl Drop for TestServerRoom {
fn drop(&mut self) {
for room in self.client_rooms.values() {
let mut state = room.0.lock();
*state.connection.0.borrow_mut() = ConnectionState::Disconnected;
}
}
}
#[derive(Debug)]
struct TestServerVideoTrack {
sid: Sid,
@ -694,11 +702,15 @@ impl LocalTrackPublication {
pub fn is_muted(&self) -> bool {
if let Some(room) = self.room.upgrade() {
room.test_server()
.is_track_muted(&room.token(), &self.sid)
.unwrap_or(false)
if room.is_connected() {
room.test_server()
.is_track_muted(&room.token(), &self.sid)
.unwrap_or(true)
} else {
true
}
} else {
false
true
}
}