Skip to content

Commit

Permalink
update -> set
Browse files Browse the repository at this point in the history
  • Loading branch information
keepingitneil committed Jul 15, 2024
1 parent b1f4828 commit 5323320
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions livekit-ffi/src/server/room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ impl RoomInner {
let res = inner
.room
.local_participant()
.update_metadata(update_local_metadata.metadata)
.set_metadata(update_local_metadata.metadata)
.await;

let _ = server.send_event(proto::ffi_event::Message::UpdateLocalMetadata(
Expand All @@ -456,7 +456,7 @@ impl RoomInner {
let async_id = server.next_id();
let inner = self.clone();
let handle = server.async_runtime.spawn(async move {
let res = inner.room.local_participant().update_name(update_local_name.name).await;
let res = inner.room.local_participant().set_name(update_local_name.name).await;

let _ = server.send_event(proto::ffi_event::Message::UpdateLocalName(
proto::SetLocalNameCallback { async_id, error: res.err().map(|e| e.to_string()) },
Expand All @@ -477,7 +477,7 @@ impl RoomInner {
let res = inner
.room
.local_participant()
.update_attributes(update_local_attributes.attributes)
.set_attributes(update_local_attributes.attributes)
.await;

let _ = server.send_event(proto::ffi_event::Message::UpdateLocalAttributes(
Expand Down
6 changes: 3 additions & 3 deletions livekit/src/room/participant/local_participant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ impl LocalParticipant {
Ok(publication)
}

pub async fn update_metadata(&self, metadata: String) -> RoomResult<()> {
pub async fn set_metadata(&self, metadata: String) -> RoomResult<()> {
self.inner
.rtc_engine
.send_request(proto::signal_request::Message::UpdateMetadata(
Expand All @@ -237,7 +237,7 @@ impl LocalParticipant {
Ok(())
}

pub async fn update_attributes(&self, attributes: HashMap<String, String>) -> RoomResult<()> {
pub async fn set_attributes(&self, attributes: HashMap<String, String>) -> RoomResult<()> {
self.inner
.rtc_engine
.send_request(proto::signal_request::Message::UpdateMetadata(
Expand All @@ -251,7 +251,7 @@ impl LocalParticipant {
Ok(())
}

pub async fn update_name(&self, name: String) -> RoomResult<()> {
pub async fn set_name(&self, name: String) -> RoomResult<()> {
self.inner
.rtc_engine
.send_request(proto::signal_request::Message::UpdateMetadata(
Expand Down

0 comments on commit 5323320

Please sign in to comment.