Skip to content

Commit

Permalink
投稿直後のantennaの処理を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
tar-bin committed Nov 24, 2024
1 parent 7a91b4c commit 40d57e6
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions packages/backend/src/core/AntennaService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,12 @@ export class AntennaService {
if (note.visibility === "specified") return false;
if (note.visibility === "followers") return false;

let userIds: string[] = [];
if (antenna.users && antenna.users.length > 0) {
const users = await this.usersRepository.find({
where: [
...antenna.users.map((username) => {
const acct = Acct.parse(username);
return { username: acct.username, host: acct.host ?? IsNull() };
}),
],
});
userIds = users.map((u) => u.id);
}

const notes = await this.searchService.searchNote(
"",
const notes = await this.searchService.searchNoteWithFilter(
null,
[JSON.parse(antenna.filterTree ?? "{}")],
{
userIds: userIds,
origin: antenna.localOnly ? "local" : undefined,
keywords: antenna.keywords,
excludeKeywords: antenna.excludeKeywords,
checkChannelSearchable: true,
reverseOrder: false,
hasFile: antenna.withFile,
includeReplies: antenna.withReplies,
},
{
equal: note.id,
Expand Down

0 comments on commit 40d57e6

Please sign in to comment.