This commit is contained in:
parent
1140f39993
commit
3a5e9a0f28
|
@ -15,6 +15,7 @@
|
||||||
package sync
|
package sync
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"database/sql"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -60,10 +61,10 @@ func newSyncRequest(req *http.Request, device userapi.Device, syncDB storage.Dat
|
||||||
util.GetLogger(req.Context()).WithError(err).Error("gomatrixserverlib.SplitID failed")
|
util.GetLogger(req.Context()).WithError(err).Error("gomatrixserverlib.SplitID failed")
|
||||||
return nil, fmt.Errorf("gomatrixserverlib.SplitID: %w", err)
|
return nil, fmt.Errorf("gomatrixserverlib.SplitID: %w", err)
|
||||||
}
|
}
|
||||||
if f, err := syncDB.GetFilter(req.Context(), localpart, filterQuery); err != nil {
|
if f, err := syncDB.GetFilter(req.Context(), localpart, filterQuery); err != nil && err != sql.ErrNoRows {
|
||||||
util.GetLogger(req.Context()).WithError(err).Error("syncDB.GetFilter failed")
|
util.GetLogger(req.Context()).WithError(err).Error("syncDB.GetFilter failed")
|
||||||
return nil, fmt.Errorf("syncDB.GetFilter: %w", err)
|
return nil, fmt.Errorf("syncDB.GetFilter: %w", err)
|
||||||
} else {
|
} else if f != nil {
|
||||||
filter = *f
|
filter = *f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue