mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
wip
This commit is contained in:
parent
3dd3c69303
commit
783a97fe06
@ -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}`,
|
||||
|
@ -106,6 +106,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
// ミュート等考慮
|
||||
timeline = timeline.filter(note => {
|
||||
// TODO: インスタンスミュートの考慮
|
||||
// TODO: ブロックの考慮
|
||||
|
||||
if (note.userId === me.id) {
|
||||
return true;
|
||||
|
@ -132,6 +132,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
// ミュート等考慮
|
||||
timeline = timeline.filter(note => {
|
||||
// TODO: インスタンスミュートの考慮
|
||||
// TODO: ブロックの考慮
|
||||
|
||||
if (isUserRelated(note, userIdsWhoMeMuting)) return false;
|
||||
if (note.renoteId) {
|
||||
|
Loading…
Reference in New Issue
Block a user