mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 21:37:34 -07:00
Fix bug
This commit is contained in:
parent
bae308ea34
commit
d57f2f5701
1 changed files with 3 additions and 3 deletions
|
@ -11,13 +11,13 @@ export default async function(
|
||||||
subscriber: Xev,
|
subscriber: Xev,
|
||||||
user: IUser
|
user: IUser
|
||||||
) {
|
) {
|
||||||
|
const mute = await Mute.find({ muterId: user._id });
|
||||||
|
const mutedUserIds = mute.map(m => m.muteeId.toString());
|
||||||
|
|
||||||
// Subscribe stream
|
// Subscribe stream
|
||||||
subscriber.on('hybrid-timeline', onEvent);
|
subscriber.on('hybrid-timeline', onEvent);
|
||||||
subscriber.on(`hybrid-timeline:${user._id}`, onEvent);
|
subscriber.on(`hybrid-timeline:${user._id}`, onEvent);
|
||||||
|
|
||||||
const mute = await Mute.find({ muterId: user._id });
|
|
||||||
const mutedUserIds = mute.map(m => m.muteeId.toString());
|
|
||||||
|
|
||||||
async function onEvent(note: any) {
|
async function onEvent(note: any) {
|
||||||
//#region 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
|
//#region 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
|
||||||
if (mutedUserIds.indexOf(note.userId) != -1) {
|
if (mutedUserIds.indexOf(note.userId) != -1) {
|
||||||
|
|
Loading…
Reference in a new issue