Add some additional checks for a portal creation

Refs #15
This commit is contained in:
Gary Kramlich
2022-02-28 04:52:51 -06:00
parent 2db80efad5
commit 91a08dfd15
2 changed files with 10 additions and 3 deletions

View File

@@ -374,6 +374,10 @@ func (u *User) channelCreateHandler(s *discordgo.Session, c *discordgo.ChannelCr
key := database.NewPortalKey(c.ID, u.User.ID)
portal := u.bridge.GetPortalByID(key)
if portal.MXID != "" {
return
}
portal.Name = c.Name
portal.Topic = c.Topic
portal.Type = c.Type