mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-24 01:11:51 +00:00
Temporarily join public channels as a member
This commit is contained in:
parent
3412becfc5
commit
5b39fc8123
2 changed files with 3 additions and 4 deletions
|
@ -135,7 +135,8 @@ impl Database {
|
|||
.most_public_ancestor_for_channel(channel_id, &*tx)
|
||||
.await?
|
||||
.unwrap_or(channel_id);
|
||||
role = Some(ChannelRole::Guest);
|
||||
// TODO: change this back to Guest.
|
||||
role = Some(ChannelRole::Member);
|
||||
joined_channel_id = Some(channel_id_to_join);
|
||||
|
||||
channel_member::Entity::insert(channel_member::ActiveModel {
|
||||
|
@ -789,7 +790,7 @@ impl Database {
|
|||
user_id: UserId,
|
||||
tx: &DatabaseTransaction,
|
||||
) -> Result<()> {
|
||||
match dbg!(self.channel_role_for_user(channel_id, user_id, tx).await)? {
|
||||
match self.channel_role_for_user(channel_id, user_id, tx).await? {
|
||||
Some(ChannelRole::Admin) => Ok(()),
|
||||
Some(ChannelRole::Member)
|
||||
| Some(ChannelRole::Banned)
|
||||
|
|
|
@ -2720,10 +2720,8 @@ async fn join_channel_internal(
|
|||
channel_id: joined_room.channel_id.map(|id| id.to_proto()),
|
||||
live_kit_connection_info,
|
||||
})?;
|
||||
dbg!("Joined channel", &joined_channel);
|
||||
|
||||
if let Some(joined_channel) = joined_channel {
|
||||
dbg!("CMU");
|
||||
channel_membership_updated(db, joined_channel, &session).await?
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue