Skip to content

Commit

Permalink
Check if body is defined (#1924)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uros Marolt authored Dec 4, 2023
1 parent 9f45fe1 commit ac9d0a9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class AutomationService {
}

// check whether activity content contains any of the keywords
if (shouldProcess && settings.keywords && settings.keywords.length > 0) {
if (shouldProcess && settings.keywords && settings.keywords.length > 0 && activity.body) {
const body = (activity.body as string).toLowerCase()
if (!settings.keywords.some((keyword) => body.includes(keyword.trim().toLowerCase()))) {
this.log.warn(
Expand Down

0 comments on commit ac9d0a9

Please sign in to comment.