mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 04:33:50 +01:00
Fix bug
This commit is contained in:
parent
01676a0ce7
commit
498872bda1
@ -164,14 +164,19 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
|
||||
}
|
||||
|
||||
// 通知
|
||||
if (isLocalUser(data.reply._user)) {
|
||||
nm.push(data.reply.userId, 'reply');
|
||||
}
|
||||
}
|
||||
|
||||
// If it is renote
|
||||
if (data.renote) {
|
||||
// Notify
|
||||
const type = data.text ? 'quote' : 'renote';
|
||||
|
||||
// Notify
|
||||
if (isLocalUser(data.renote._user)) {
|
||||
nm.push(data.renote.userId, type);
|
||||
}
|
||||
|
||||
// Fetch watchers
|
||||
nmRelatedPromises.push(notifyToWatchersOfRenotee(data.renote, user, nm, type));
|
||||
@ -181,17 +186,11 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
|
||||
watch(user._id, data.renote);
|
||||
}
|
||||
|
||||
// If it is quote renote
|
||||
if (data.text) {
|
||||
// Add mention
|
||||
nm.push(data.renote.userId, 'quote');
|
||||
} else {
|
||||
// Publish event
|
||||
if (!user._id.equals(data.renote.userId)) {
|
||||
publishUserStream(data.renote.userId, 'renote', noteObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!silent) {
|
||||
publish(user, note, noteObj, data.reply, data.renote, data.visibleUsers, noteActivity);
|
||||
|
Loading…
Reference in New Issue
Block a user