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 e8fadcc commit ba02555
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions packages/backend/src/core/InboxRuleService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,31 +107,18 @@ export class InboxRuleService {
case 'maxMentionsMoreThanOrEq': {
if (isNote(activity)) {
const apMentions = await this.apMentionService.extractApMentions(activity.tag as unknown as IPost, this.apResolverService.createResolver());
console.log('apMentions');
console.log(apMentions.length);
console.log(value.value);
console.log('apMentionsEnd');

return apMentions.length ? apMentions.length >= value.value : false;
}
return false;
}
// 添付ファイル数が指定値以上
case 'attachmentFileMoreThanOrEq': {
if (isNote(activity)) {
console.log('attachment');
console.log(activity.attachment?.length);
console.log(value.value);
console.log(activity.attachment?.length ? activity.attachment.length >= value.value : false);
console.log('attachmentEnd');
return activity.attachment?.length ? activity.attachment.length >= value.value : false;
}
return false;
}
case 'thisActivityIsNote': {
console.log('thisActivityIsNote');
console.log(isNote(activity));
console.log('thisActivityIsNoteEnd');
return isNote(activity);
}
// 指定されたワードが含まれている
Expand Down Expand Up @@ -164,10 +151,6 @@ export class InboxRuleService {
}
// このサーバーのユーザーをフォローしているユーザーの数が~以下
case 'serverSubLessThanOrEq': {
console.log('serverSubLessThanOrEq');
console.log(instance.followingCount);
console.log(value.value);
console.log('serverSubLessThanOrEqEnd');
return instance.followingCount <= value.value;
}
// このサーバーのユーザーをフォローしているユーザーの数が~以上
Expand Down

0 comments on commit ba02555

Please sign in to comment.