summaryrefslogtreecommitdiff
path: root/src/api/common/notify.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-02-04 15:02:14 +0900
committerGitHub <noreply@github.com>2018-02-04 15:02:14 +0900
commit744c3e2ef8ef89355f72262b1e8c8f2fbb020f2a (patch)
treede3630065fcddeb1916668ef3b0b43a219340e2e /src/api/common/notify.ts
parentUpdate dependencies :rocket: (diff)
parentwip (diff)
downloadmisskey-744c3e2ef8ef89355f72262b1e8c8f2fbb020f2a.tar.gz
misskey-744c3e2ef8ef89355f72262b1e8c8f2fbb020f2a.tar.bz2
misskey-744c3e2ef8ef89355f72262b1e8c8f2fbb020f2a.zip
Merge pull request #1097 from syuilo/refactor
Refactor
Diffstat (limited to 'src/api/common/notify.ts')
-rw-r--r--src/api/common/notify.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/common/notify.ts b/src/api/common/notify.ts
index 2b79416a30..ae5669b84c 100644
--- a/src/api/common/notify.ts
+++ b/src/api/common/notify.ts
@@ -2,7 +2,7 @@ import * as mongo from 'mongodb';
import Notification from '../models/notification';
import Mute from '../models/mute';
import event from '../event';
-import serialize from '../serializers/notification';
+import { pack } from '../models/notification';
export default (
notifiee: mongo.ObjectID,
@@ -27,7 +27,7 @@ export default (
// Publish notification event
event(notifiee, 'notification',
- await serialize(notification));
+ await pack(notification));
// 3秒経っても(今回作成した)通知が既読にならなかったら「未読の通知がありますよ」イベントを発行する
setTimeout(async () => {
@@ -44,7 +44,7 @@ export default (
}
//#endregion
- event(notifiee, 'unread_notification', await serialize(notification));
+ event(notifiee, 'unread_notification', await pack(notification));
}
}, 3000);
});