Allow empty last sent ID for the first event

This commit is contained in:
Kegan Dougal 2020-02-12 12:11:33 +00:00
parent fb9243b4ed
commit 9bb33c4d24

View file

@ -87,7 +87,7 @@ func (d *Database) UpdateRoom(
return nil
}
if lastSentEventID != oldEventID {
if lastSentEventID != "" && lastSentEventID != oldEventID {
return types.EventIDMismatchError{
DatabaseID: lastSentEventID, RoomServerID: oldEventID,
}