From 614509740b8ed7f43c0402b499c81004e1195751 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 17 Nov 2024 14:27:55 +0800 Subject: [PATCH] :bug: Fix event new null pointer exception --- pkg/internal/services/events.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/services/events.go b/pkg/internal/services/events.go index 5c37255..dfe1e71 100644 --- a/pkg/internal/services/events.go +++ b/pkg/internal/services/events.go @@ -93,7 +93,7 @@ func NewEvent(event models.Event) (models.Event, error) { if strings.HasPrefix(event.Type, "messages") { event.Channel, _ = GetChannel(event.ChannelID) - if event.Channel.RealmID == nil { + if event.Channel.RealmID != nil { realm, err := authkit.GetRealm(gap.Nx, *event.Channel.RealmID) if err == nil { event.Channel.Realm = &realm