From 60fb9d292843bdac0cadbbf53accac42a7f77eaf Mon Sep 17 00:00:00 2001 From: Ashish Jhanwar Date: Fri, 25 Aug 2023 12:55:25 +0530 Subject: [PATCH] hotfix on a panic for IsThread condition --- automod/conditions.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/automod/conditions.go b/automod/conditions.go index a32993d8f4..aac5d191c7 100644 --- a/automod/conditions.go +++ b/automod/conditions.go @@ -618,6 +618,11 @@ func (bc *ThreadCondition) UserSettings() []*SettingDef { } func (bc *ThreadCondition) IsMet(data *TriggeredRuleData, settings interface{}) (bool, error) { + //Channel won't be present in case the trigger is on member update event like nick update + if data.CS == nil { + return true, nil + } + if !bc.Threads { return !data.CS.Type.IsThread(), nil }