Fix wrong removal in latest commit

This commit is contained in:
Brendan Abolivier 2017-07-24 14:59:42 +01:00
parent 790a5634f4
commit 37a9db5e6a
No known key found for this signature in database
GPG key ID: 8EF1500759F70623

View file

@ -100,6 +100,11 @@ func (d *SyncServerDatabase) WriteEvent(
}
streamPos = types.StreamPosition(pos)
if len(addStateEvents) == 0 && len(removeStateEventIDs) == 0 {
// Nothing to do, the event may have just been a message event.
return nil
}
return d.updateRoomState(txn, removeStateEventIDs, addStateEvents, streamPos)
})
return