Send channel permissions to clients when they fetch their channels

This commit is contained in:
Max Brunsfeld 2023-08-09 13:43:16 -07:00
parent a3623ec2b8
commit 60e25d780a
4 changed files with 60 additions and 29 deletions

View file

@ -1,6 +1,5 @@
use util::http::FakeHttpClient;
use super::*;
use util::http::FakeHttpClient;
#[gpui::test]
fn test_update_channels(cx: &mut AppContext) {
@ -25,6 +24,10 @@ fn test_update_channels(cx: &mut AppContext) {
parent_id: None,
},
],
channel_permissions: vec![proto::ChannelPermission {
channel_id: 1,
is_admin: true,
}],
..Default::default()
},
cx,
@ -64,7 +67,7 @@ fn test_update_channels(cx: &mut AppContext) {
(0, "a", false),
(1, "y", false),
(0, "b", true),
(1, "x", false),
(1, "x", true),
],
cx,
);