Skip to content

Commit

Permalink
Ensure null is not sent when we mean []
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed May 20, 2024
1 parent 425a5d4 commit e295c31
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sync3/extensions/e2ee.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ func (r *E2EERequest) ProcessInitial(ctx context.Context, res *Response, extCtx
extRes.OTKCounts = dd.OTKCounts
hasUpdates = true
}
if dd.DeviceListChanged == nil {
dd.DeviceListChanged = make([]string, 0)
}
if dd.DeviceListLeft == nil {
dd.DeviceListLeft = make([]string, 0)
}
if len(dd.DeviceListChanged) > 0 || len(dd.DeviceListLeft) > 0 {
extRes.DeviceLists = &E2EEDeviceList{
Changed: dd.DeviceListChanged,
Expand Down

0 comments on commit e295c31

Please sign in to comment.