Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyatea committed Nov 5, 2024
1 parent 0f407db commit 936774a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/backend/src/core/InboxRuleService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ export class InboxRuleService {
// メンション数が指定値以上
case 'maxMentionsMoreThanOrEq': {
if (isNote(activity.object)) {
return activity.object?.tag ? activity.object?.tag?.length >= value.value : false;
return activity.object?.tag
? activity.object?.tag?.filter(t => t.type === 'Mention').length >= value.value
: false;
}
return false;
}
Expand All @@ -123,7 +125,7 @@ export class InboxRuleService {
// 指定されたワードが含まれている
case 'isIncludeThisWord': {
if (isNote(activity.object)) {
return this.utilityService.isKeyWordIncluded(typeof activity.object?.content === 'string' ? activity.object.content : '', [value.value]);
return this.utilityService.isKeyWordIncluded(typeof activity.object?.content === 'string' ? activity.object?.content : '', [value.value]);
}
return false;
}
Expand Down

0 comments on commit 936774a

Please sign in to comment.