mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-10 16:33:11 -06:00
Fix a bug in aliases creation
This commit is contained in:
parent
115b1e57a7
commit
10c2bb3743
|
|
@ -226,7 +226,10 @@ func (s *publicRoomsStatements) updateRoomAttribute(attrName string, attrValue a
|
|||
var value interface{}
|
||||
if attrName == "aliases" {
|
||||
// Aliases need a special conversion
|
||||
value = pq.StringArray(attrValue.([]string))
|
||||
if value, err = pq.StringArray(attrValue.([]string)); err != nil {
|
||||
// attrValue isn't a slice of strings
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
value = attrValue
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ CREATE TABLE IF NOT EXISTS roomserver_room_aliases (
|
|||
room_id TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS roomserver_room_id_idx ON roomserver_room_aliases(room_id);
|
||||
CREATE INDEX IF NOT EXISTS roomserver_room_id_idx ON roomserver_room_aliases(room_id);
|
||||
`
|
||||
|
||||
const insertRoomAliasSQL = "" +
|
||||
|
|
|
|||
Loading…
Reference in a new issue