Don't return error if there's no work to do

This commit is contained in:
Neil Alexander 2021-01-12 12:45:29 +00:00
parent 199c5f3f88
commit aa5c621397
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -909,7 +909,7 @@ func (d *Database) SendToDeviceUpdatesForSync(
// If there's nothing to do then stop here.
if len(events) == 0 {
return 0, nil, fmt.Errorf("no send-to-device messages for user %q device %q in range %d -> %d", userID, deviceID, from, to)
return 0, nil, nil
}
// If we've advanced past this stream position for this