Skip to content

Commit

Permalink
Revert protobuf name migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
mikayla-maki committed Dec 4, 2024
1 parent 6367b2d commit 9c9e1d5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/collab/src/db/queries/channels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ impl Database {
} else {
let result = room::Entity::insert(room::ActiveModel {
channel_id: ActiveValue::Set(Some(channel_id)),
livekit_room: ActiveValue::Set(livekit_room.to_string()),
live_kit_room: ActiveValue::Set(livekit_room.to_string()),
..Default::default()
})
.exec(tx)
Expand Down
4 changes: 2 additions & 2 deletions crates/collab/src/db/queries/rooms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl Database {
) -> Result<proto::Room> {
self.transaction(|tx| async move {
let room = room::ActiveModel {
livekit_room: ActiveValue::set(livekit_room.into()),
live_kit_room: ActiveValue::set(livekit_room.into()),
..Default::default()
}
.insert(&*tx)
Expand Down Expand Up @@ -1316,7 +1316,7 @@ impl Database {
channel,
proto::Room {
id: db_room.id.to_proto(),
livekit_room: db_room.livekit_room,
livekit_room: db_room.live_kit_room,
participants: participants.into_values().collect(),
pending_participants,
followers,
Expand Down
2 changes: 1 addition & 1 deletion crates/collab/src/db/tables/room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use sea_orm::entity::prelude::*;
pub struct Model {
#[sea_orm(primary_key)]
pub id: RoomId,
pub livekit_room: String,
pub live_kit_room: String,
pub channel_id: Option<ChannelId>,
}

Expand Down
12 changes: 6 additions & 6 deletions crates/collab/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ async fn create_room(
) -> Result<()> {
let livekit_room = nanoid::nanoid!(30);

let livekit_connection_info = util::maybe!(async {
let live_kit_connection_info = util::maybe!(async {
let live_kit = session.app_state.livekit_client.as_ref();
let live_kit = live_kit?;
let user_id = session.user_id().to_string();
Expand All @@ -1237,7 +1237,7 @@ async fn create_room(

response.send(proto::CreateRoomResponse {
room: Some(room.clone()),
livekit_connection_info,
live_kit_connection_info,
})?;

update_user_contacts(session.user_id(), &session).await?;
Expand Down Expand Up @@ -1284,7 +1284,7 @@ async fn join_room(
.trace_err();
}

let livekit_connection_info = if let Some(live_kit) = session.app_state.livekit_client.as_ref()
let live_kit_connection_info = if let Some(live_kit) = session.app_state.livekit_client.as_ref()
{
live_kit
.room_token(
Expand All @@ -1304,7 +1304,7 @@ async fn join_room(
response.send(proto::JoinRoomResponse {
room: Some(joined_room.room),
channel_id: None,
livekit_connection_info,
live_kit_connection_info,
})?;

update_user_contacts(session.user_id(), &session).await?;
Expand Down Expand Up @@ -3088,7 +3088,7 @@ async fn join_channel_internal(
.join_channel(channel_id, session.user_id(), session.connection_id)
.await?;

let livekit_connection_info =
let live_kit_connection_info =
session
.app_state
.livekit_client
Expand Down Expand Up @@ -3129,7 +3129,7 @@ async fn join_channel_internal(
.channel
.as_ref()
.map(|channel| channel.id.to_proto()),
livekit_connection_info,
live_kit_connection_info,
})?;

let mut connection_pool = session.connection_pool().await;
Expand Down
2 changes: 1 addition & 1 deletion crates/proto/proto/zed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ message Room {
repeated Participant participants = 2;
repeated PendingParticipant pending_participants = 3;
repeated Follower followers = 4;
string live_kit_room = 5;
string livekit_room = 5;
}

message Participant {
Expand Down

0 comments on commit 9c9e1d5

Please sign in to comment.