This commit is contained in:
syuilo
2018-09-11 20:57:25 +09:00
parent fe3dd25bc3
commit 1fea2cdcbe
3 changed files with 21 additions and 21 deletions

View File

@ -36,6 +36,13 @@ export default async function(
// Subscribe Home stream channel
subscriber.on(`user-stream:${user._id}`, async x => {
// Renoteなら再pack
if (x.type == 'note' && x.body.renoteId != null) {
x.body.renote = await pack(x.body.renoteId, user, {
detail: true
});
}
//#region 流れてきたメッセージがミュートしているユーザーが関わるものだったら無視する
if (x.type == 'note') {
if (mutedUserIds.includes(x.body.userId)) {
@ -54,13 +61,6 @@ export default async function(
}
//#endregion
// Renoteなら再pack
if (x.type == 'note' && x.body.renoteId != null) {
x.body.renote = await pack(x.body.renoteId, user, {
detail: true
});
}
connection.send(JSON.stringify(x));
});