summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-08-02 09:37:13 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-08-02 09:37:13 +0900
commite6915244161ff2fd33aa0f2f9910c212a0b9ebb4 (patch)
treef7b2239f96c57ae3f2ada9196b1928fc5b3c92c3 /src/services
parenttype指定廃止 (diff)
downloadsharkey-e6915244161ff2fd33aa0f2f9910c212a0b9ebb4.tar.gz
sharkey-e6915244161ff2fd33aa0f2f9910c212a0b9ebb4.tar.bz2
sharkey-e6915244161ff2fd33aa0f2f9910c212a0b9ebb4.zip
Fix bug
Diffstat (limited to 'src/services')
-rw-r--r--src/services/note/create.ts23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/services/note/create.ts b/src/services/note/create.ts
index 6e644ef1d3..20dfc78c04 100644
--- a/src/services/note/create.ts
+++ b/src/services/note/create.ts
@@ -164,14 +164,19 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
}
// 通知
- nm.push(data.reply.userId, 'reply');
+ 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';
- nm.push(data.renote.userId, type);
+
+ // Notify
+ if (isLocalUser(data.renote._user)) {
+ nm.push(data.renote.userId, type);
+ }
// Fetch watchers
nmRelatedPromises.push(notifyToWatchersOfRenotee(data.renote, user, nm, type));
@@ -181,15 +186,9 @@ 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);
- }
+ // Publish event
+ if (!user._id.equals(data.renote.userId)) {
+ publishUserStream(data.renote.userId, 'renote', noteObj);
}
}