🐛 Fix event new null pointer exception
This commit is contained in:
parent
461d4c0e70
commit
614509740b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user