Skip to content

Commit

Permalink
hotfix on a panic for IsThread condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishjh-bst committed Aug 25, 2023
1 parent e63cc48 commit 60fb9d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions automod/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 60fb9d2

Please sign in to comment.