Filling out messages unlikely to change in v2. (#3806)

* Filling out messages unlikely to change in v2.

* deps

* remove defensive nil checks
This commit is contained in:
Raja Subramanian
2025-07-21 12:33:52 +05:30
committed by GitHub
parent 1c99b9ad5f
commit f5fc82d344
6 changed files with 68 additions and 86 deletions
+4 -1
View File
@@ -58,12 +58,15 @@ func (s *SignalCache) SetLastProcessedRemoteMessageId(lastProcessedRemoteMessage
s.lastProcessedRemoteMessageId = lastProcessedRemoteMessageId
}
func (s *SignalCache) Add(msg *livekit.Signalv2ServerMessage) {
func (s *SignalCache) Add(msg *livekit.Signalv2ServerMessage) *livekit.Signalv2ServerMessage {
if msg != nil {
s.AddBatch([]*livekit.Signalv2ServerMessage{msg})
}
return msg
}
// SIGNALLING-V2-TODO: may not need this API
func (s *SignalCache) AddBatch(msgs []*livekit.Signalv2ServerMessage) {
s.lock.Lock()
defer s.lock.Unlock()