Refactor participant metadata updates to avoid duplication (#1679)
* Refactor participant metadata updates to avoid duplication * generated fakes
This commit is contained in:
@@ -649,6 +649,15 @@ func (r *Room) SetMetadata(metadata string) {
|
||||
r.protoProxy.MarkDirty(true)
|
||||
}
|
||||
|
||||
func (r *Room) UpdateParticipantMetadata(participant types.LocalParticipant, name string, metadata string) {
|
||||
if metadata != "" {
|
||||
participant.SetMetadata(metadata)
|
||||
}
|
||||
if name != "" {
|
||||
participant.SetName(name)
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Room) sendRoomUpdate() {
|
||||
roomInfo := r.ToProto()
|
||||
// Send update to participants
|
||||
|
||||
Reference in New Issue
Block a user