forked from mirror/mautrix-discord
Ignore guild delete events with unavailable=true
This commit is contained in:
parent
3c4561113b
commit
b87421f0fb
1 changed files with 4 additions and 0 deletions
4
user.go
4
user.go
|
@ -1024,6 +1024,10 @@ func (user *User) guildCreateHandler(g *discordgo.GuildCreate) {
|
|||
}
|
||||
|
||||
func (user *User) guildDeleteHandler(g *discordgo.GuildDelete) {
|
||||
if g.Unavailable {
|
||||
user.log.Info().Str("guild_id", g.ID).Msg("Ignoring guild delete event with unavailable flag")
|
||||
return
|
||||
}
|
||||
user.log.Info().Str("guild_id", g.ID).Msg("Got guild delete event")
|
||||
user.MarkNotInPortal(g.ID)
|
||||
guild := user.bridge.GetGuildByID(g.ID, false)
|
||||
|
|
Loading…
Reference in a new issue