Sync Role as part of channels

Begin to fix guest notifications
This commit is contained in:
Conrad Irwin 2023-10-17 22:48:44 -06:00
parent 72ed8a6dd2
commit 70aed4a605
15 changed files with 323 additions and 266 deletions

View file

@ -360,7 +360,7 @@ impl ChatPanel {
let is_admin = self
.channel_store
.read(cx)
.is_user_admin(active_chat.channel().id);
.is_channel_admin(active_chat.channel().id);
let last_message = active_chat.message(ix.saturating_sub(1));
let this_message = active_chat.message(ix);
let is_continuation = last_message.id != this_message.id

View file

@ -2721,7 +2721,11 @@ impl CollabPanel {
},
));
if self.channel_store.read(cx).is_user_admin(path.channel_id()) {
if self
.channel_store
.read(cx)
.is_channel_admin(path.channel_id())
{
let parent_id = path.parent_id();
items.extend([
@ -3160,7 +3164,7 @@ impl CollabPanel {
fn rename_channel(&mut self, action: &RenameChannel, cx: &mut ViewContext<Self>) {
let channel_store = self.channel_store.read(cx);
if !channel_store.is_user_admin(action.location.channel_id()) {
if !channel_store.is_channel_admin(action.location.channel_id()) {
return;
}
if let Some(channel) = channel_store