Make contact wait delay configurable and fix nil pointer usage

This commit is contained in:
Tulir Asokan
2019-05-30 20:25:04 +03:00
parent 02f78155b5
commit 37cd34e4bf
4 changed files with 10 additions and 4 deletions

View File

@ -410,7 +410,7 @@ func (portal *Portal) ensureUserInvited(user *User) {
portal.log.Warnfln("Failed to ensure %s is invited to %s: %v", user.MXID, portal.MXID, err)
}
customPuppet := portal.bridge.GetPuppetByCustomMXID(user.MXID)
if customPuppet.CustomIntent() != nil {
if customPuppet != nil && customPuppet.CustomIntent() != nil {
_ = customPuppet.CustomIntent().EnsureJoined(portal.MXID)
}
}