Push role refactoring through RPC/client

This commit is contained in:
Conrad Irwin 2023-10-11 21:57:46 -06:00
parent 690d9fb971
commit 540436a1f9
12 changed files with 178 additions and 89 deletions

View file

@ -17,7 +17,7 @@ use gpui::{executor::Deterministic, ModelHandle, Task, TestAppContext, WindowHan
use language::LanguageRegistry;
use parking_lot::Mutex;
use project::{Project, WorktreeId};
use rpc::RECEIVE_TIMEOUT;
use rpc::{proto::ChannelRole, RECEIVE_TIMEOUT};
use settings::SettingsStore;
use std::{
cell::{Ref, RefCell, RefMut},
@ -325,7 +325,7 @@ impl TestServer {
channel_store.invite_member(
channel_id,
member_client.user_id().unwrap(),
false,
ChannelRole::Member,
cx,
)
})
@ -613,7 +613,12 @@ impl TestClient {
cx_self
.read(ChannelStore::global)
.update(cx_self, |channel_store, cx| {
channel_store.invite_member(channel, other_client.user_id().unwrap(), true, cx)
channel_store.invite_member(
channel,
other_client.user_id().unwrap(),
ChannelRole::Admin,
cx,
)
})
.await
.unwrap();