mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Fix #45: ensure we don't send null when we mean []
This commit is contained in:
parent
d591dd0584
commit
b90a18a62a
@ -339,6 +339,8 @@ func (p *Poller) FallbackKeyTypes() []string {
|
|||||||
func (p *Poller) DeviceListChanges() (changed, left []string) {
|
func (p *Poller) DeviceListChanges() (changed, left []string) {
|
||||||
p.e2eeMu.Lock()
|
p.e2eeMu.Lock()
|
||||||
defer p.e2eeMu.Unlock()
|
defer p.e2eeMu.Unlock()
|
||||||
|
changed = make([]string, 0)
|
||||||
|
left = make([]string, 0)
|
||||||
for userID, state := range p.deviceListChanges {
|
for userID, state := range p.deviceListChanges {
|
||||||
switch state {
|
switch state {
|
||||||
case "changed":
|
case "changed":
|
||||||
|
@ -19,8 +19,8 @@ func (r AccountDataRequest) ApplyDelta(next *AccountDataRequest) *AccountDataReq
|
|||||||
|
|
||||||
// Server response
|
// Server response
|
||||||
type AccountDataResponse struct {
|
type AccountDataResponse struct {
|
||||||
Global []json.RawMessage `json:"global"`
|
Global []json.RawMessage `json:"global,omitempty"`
|
||||||
Rooms map[string][]json.RawMessage `json:"rooms"`
|
Rooms map[string][]json.RawMessage `json:"rooms,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *AccountDataResponse) HasData(isInitial bool) bool {
|
func (r *AccountDataResponse) HasData(isInitial bool) bool {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user