wip
This commit is contained in:
@@ -481,7 +481,13 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||
if (data.reply) {
|
||||
// TODO
|
||||
} else {
|
||||
this.pushToTl(note, user);
|
||||
if (data.visibility === 'public' || data.visibility === 'home') {
|
||||
this.pushToTl(note, user);
|
||||
} else if (data.visibility === 'followers') {
|
||||
this.pushToTl(note, user);
|
||||
} else if (data.visibility === 'specified') {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
||||
this.antennaService.addNoteToAntennas(note, user);
|
||||
@@ -807,7 +813,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||
select: ['followerId'],
|
||||
});
|
||||
|
||||
const userLists = await this.userListJoiningsRepository.find({
|
||||
let userLists = await this.userListJoiningsRepository.find({
|
||||
where: {
|
||||
userId: user.id,
|
||||
},
|
||||
@@ -833,6 +839,11 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||
}
|
||||
}
|
||||
|
||||
if (note.visibility === 'followers') {
|
||||
// TODO: 重そうだから何とかしたい Set 使う?
|
||||
userLists = userLists.filter(x => followings.some(f => f.followerId === x.userListId));
|
||||
}
|
||||
|
||||
for (const userList of userLists) {
|
||||
redisPipeline.xadd(
|
||||
`userListTimeline:${userList.userListId}`,
|
||||
|
Reference in New Issue
Block a user