summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/notify.ts4
-rw-r--r--src/server/api/endpoints/messaging/messages/create.ts4
-rw-r--r--src/services/note/unread.ts4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/notify.ts b/src/notify.ts
index eaef63e3c3..522f4c52dd 100644
--- a/src/notify.ts
+++ b/src/notify.ts
@@ -39,7 +39,7 @@ export default (
}
});
- // 3秒経っても(今回作成した)通知が既読にならなかったら「未読の通知がありますよ」イベントを発行する
+ // 2秒経っても(今回作成した)通知が既読にならなかったら「未読の通知がありますよ」イベントを発行する
setTimeout(async () => {
const fresh = await Notification.findOne({ _id: notification._id }, { isRead: true });
if (!fresh.isRead) {
@@ -58,5 +58,5 @@ export default (
pushSw(notifiee, 'notification', packed);
}
- }, 3000);
+ }, 2000);
});
diff --git a/src/server/api/endpoints/messaging/messages/create.ts b/src/server/api/endpoints/messaging/messages/create.ts
index f504f92326..cb115cf987 100644
--- a/src/server/api/endpoints/messaging/messages/create.ts
+++ b/src/server/api/endpoints/messaging/messages/create.ts
@@ -102,7 +102,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
}
});
- // 3秒経っても(今回作成した)メッセージが既読にならなかったら「未読のメッセージがありますよ」イベントを発行する
+ // 2秒経っても(今回作成した)メッセージが既読にならなかったら「未読のメッセージがありますよ」イベントを発行する
setTimeout(async () => {
const freshMessage = await Message.findOne({ _id: message._id }, { isRead: true });
if (!freshMessage.isRead) {
@@ -120,7 +120,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
publishMainStream(message.recipientId, 'unreadMessagingMessage', messageObj);
pushSw(message.recipientId, 'unreadMessagingMessage', messageObj);
}
- }, 3000);
+ }, 2000);
// 履歴作成(自分)
History.update({
diff --git a/src/services/note/unread.ts b/src/services/note/unread.ts
index 5953f61fe1..e84ac2a4bf 100644
--- a/src/services/note/unread.ts
+++ b/src/services/note/unread.ts
@@ -22,7 +22,7 @@ export default async function(user: IUser, note: INote, isSpecified = false) {
}
});
- // 3秒経っても既読にならなかったら「未読の投稿がありますよ」イベントを発行する
+ // 2秒経っても既読にならなかったら「未読の投稿がありますよ」イベントを発行する
setTimeout(async () => {
const exist = await NoteUnread.findOne({ _id: unread._id });
if (exist == null) return;
@@ -43,5 +43,5 @@ export default async function(user: IUser, note: INote, isSpecified = false) {
if (isSpecified) {
publishMainStream(user._id, 'unreadSpecifiedNote', note._id);
}
- }, 3000);
+ }, 2000);
}