hide muted threads from timelines
This commit is contained in:
parent
a4c0ef824c
commit
7d0f995c9b
18 changed files with 134 additions and 51 deletions
|
|
@ -647,18 +647,15 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
if (data.reply) {
|
||||
// 通知
|
||||
if (data.reply.userHost === null) {
|
||||
const isThreadMuted = await this.noteThreadMutingsRepository.exists({
|
||||
where: {
|
||||
userId: data.reply.userId,
|
||||
threadId: data.reply.threadId ?? data.reply.id,
|
||||
},
|
||||
});
|
||||
const threadId = data.reply.threadId ?? data.reply.id;
|
||||
|
||||
const [
|
||||
isThreadMuted,
|
||||
userIdsWhoMeMuting,
|
||||
] = data.reply.userId ? await Promise.all([
|
||||
] = await Promise.all([
|
||||
this.cacheService.threadMutingsCache.fetch(data.reply.userId).then(ms => ms.has(threadId)),
|
||||
this.cacheService.userMutingsCache.fetch(data.reply.userId),
|
||||
]) : [new Set<string>()];
|
||||
]);
|
||||
|
||||
const muted = isUserRelated(note, userIdsWhoMeMuting);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue