mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 22:22:46 +00:00
Unbreak dendritejs
This commit is contained in:
parent
895c8f03c0
commit
42e797de5e
3 changed files with 49 additions and 3 deletions
|
@ -26,9 +26,7 @@ import (
|
|||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
// Import the sqlite3 database driver.
|
||||
"github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
// Database represents an account database
|
||||
|
@ -172,7 +170,7 @@ func (d *Database) createAccount(
|
|||
}
|
||||
}
|
||||
if err := d.profiles.insertProfile(ctx, txn, localpart); err != nil {
|
||||
if errors.Is(err, sqlite3.ErrConstraint) {
|
||||
if isConstraintError(err) {
|
||||
return nil, internal.ErrUserExists
|
||||
}
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue