summaryrefslogtreecommitdiff
path: root/src/services/note
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-08-02 10:05:41 +0900
committerGitHub <noreply@github.com>2018-08-02 10:05:41 +0900
commit3fa8433a0e0943a8c6320d3e7cda0f705b2dd25a (patch)
tree1701e9e2627622ab2280ba9acf61247758b3e562 /src/services/note
parentNew translations ja.yml (Catalan) (diff)
parent:v: (diff)
downloadmisskey-3fa8433a0e0943a8c6320d3e7cda0f705b2dd25a.tar.gz
misskey-3fa8433a0e0943a8c6320d3e7cda0f705b2dd25a.tar.bz2
misskey-3fa8433a0e0943a8c6320d3e7cda0f705b2dd25a.zip
Merge branch 'master' into l10n_master
Diffstat (limited to 'src/services/note')
-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);
}
}