Fix desegregation changes to make the bridge work again

This commit is contained in:
Tulir Asokan
2018-08-30 01:10:26 +03:00
parent 347854dc8c
commit 22cdf519f2
9 changed files with 89 additions and 50 deletions

View File

@ -122,13 +122,15 @@ type Portal struct {
}
func (portal *Portal) Scan(row Scannable) *Portal {
err := row.Scan(&portal.Key.JID, &portal.Key.Receiver, &portal.MXID, &portal.Name, &portal.Topic, &portal.Avatar)
var mxid sql.NullString
err := row.Scan(&portal.Key.JID, &portal.Key.Receiver, &mxid, &portal.Name, &portal.Topic, &portal.Avatar)
if err != nil {
if err != sql.ErrNoRows {
portal.log.Errorln("Database scan failed:", err)
}
return nil
}
portal.MXID = mxid.String
return portal
}