This commit is contained in:
syuilo 2023-10-14 13:47:24 +09:00
parent 95e671db9b
commit e0618e9443
7 changed files with 30 additions and 14 deletions

View File

@ -38,8 +38,6 @@ class ChannelChannel extends Channel {
private async onNote(note: Packed<'Note'>) {
if (note.channelId !== this.channelId) return;
// TODO: ZQT: populate my reaction
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (isUserRelated(note, this.userIdsWhoMeMuting)) return;
// 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する
@ -47,6 +45,10 @@ class ChannelChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
}
this.connection.cacheNote(note);
this.send('note', note);

View File

@ -52,8 +52,6 @@ class GlobalTimelineChannel extends Channel {
if (note.visibility !== 'public') return;
if (note.channelId != null) return;
// TODO: ZQT: populate my reaction
// 関係ない返信は除外
if (note.reply && !this.following[note.userId]?.withReplies) {
const reply = note.reply;
@ -73,6 +71,10 @@ class GlobalTimelineChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
}
this.connection.cacheNote(note);
this.send('note', note);

View File

@ -43,8 +43,6 @@ class HashtagChannel extends Channel {
const matched = this.q.some(tags => tags.every(tag => noteTags.includes(normalizeForSearch(tag))));
if (!matched) return;
// TODO: ZQT: populate my reaction
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (isUserRelated(note, this.userIdsWhoMeMuting)) return;
// 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する
@ -52,6 +50,10 @@ class HashtagChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
}
this.connection.cacheNote(note);
this.send('note', note);

View File

@ -55,8 +55,6 @@ class HomeTimelineChannel extends Channel {
if (!Object.hasOwn(this.following, note.userId)) return;
} else if (note.visibility === 'specified') {
if (!note.visibleUserIds!.includes(this.user!.id)) return;
} else {
// TODO: ZQT: populate my reaction
}
// 関係ない返信は除外
@ -75,6 +73,10 @@ class HomeTimelineChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
}
this.connection.cacheNote(note);
this.send('note', note);

View File

@ -66,8 +66,6 @@ class HybridTimelineChannel extends Channel {
if (!Object.hasOwn(this.following, note.userId)) return;
} else if (note.visibility === 'specified') {
if (!note.visibleUserIds!.includes(this.user!.id)) return;
} else {
// TODO: ZQT: populate my reaction
}
// Ignore notes from instances the user has muted
@ -89,6 +87,10 @@ class HybridTimelineChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
}
this.connection.cacheNote(note);
this.send('note', note);

View File

@ -54,8 +54,6 @@ class LocalTimelineChannel extends Channel {
if (note.visibility !== 'public') return;
if (note.channelId != null && !this.followingChannels.has(note.channelId)) return;
// TODO: ZQT: populate my reaction
// 関係ない返信は除外
if (note.reply && this.user && !this.following[note.userId]?.withReplies && !this.withReplies) {
const reply = note.reply;
@ -72,6 +70,10 @@ class LocalTimelineChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
}
this.connection.cacheNote(note);
this.send('note', note);

View File

@ -86,8 +86,6 @@ class UserListChannel extends Channel {
if (!Object.hasOwn(this.following, note.userId)) return;
} else if (note.visibility === 'specified') {
if (!note.visibleUserIds!.includes(this.user!.id)) return;
} else {
// TODO: ZQT: populate my reaction
}
// 関係ない返信は除外
@ -104,6 +102,12 @@ class UserListChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
}
this.connection.cacheNote(note);
this.send('note', note);
}