diff --git a/sync2/poller.go b/sync2/poller.go index 6592cb0..9c5facf 100644 --- a/sync2/poller.go +++ b/sync2/poller.go @@ -339,6 +339,8 @@ func (p *Poller) FallbackKeyTypes() []string { func (p *Poller) DeviceListChanges() (changed, left []string) { p.e2eeMu.Lock() defer p.e2eeMu.Unlock() + changed = make([]string, 0) + left = make([]string, 0) for userID, state := range p.deviceListChanges { switch state { case "changed": diff --git a/sync3/extensions/account_data.go b/sync3/extensions/account_data.go index ae4bea3..5c22619 100644 --- a/sync3/extensions/account_data.go +++ b/sync3/extensions/account_data.go @@ -19,8 +19,8 @@ func (r AccountDataRequest) ApplyDelta(next *AccountDataRequest) *AccountDataReq // Server response type AccountDataResponse struct { - Global []json.RawMessage `json:"global"` - Rooms map[string][]json.RawMessage `json:"rooms"` + Global []json.RawMessage `json:"global,omitempty"` + Rooms map[string][]json.RawMessage `json:"rooms,omitempty"` } func (r *AccountDataResponse) HasData(isInitial bool) bool {