wip
This commit is contained in:
@@ -12,7 +12,7 @@ import prominence = require('prominence');
|
||||
|
||||
import DriveFile, { getGridFSBucket } from '../models/drive-file';
|
||||
import DriveFolder from '../models/drive-folder';
|
||||
import serialize from '../serializers/drive-file';
|
||||
import { pack } from '../models/drive-file';
|
||||
import event, { publishDriveStream } from '../event';
|
||||
import config from '../../conf';
|
||||
|
||||
@@ -282,7 +282,7 @@ export default (user: any, file: string | stream.Readable, ...args) => new Promi
|
||||
log(`drive file has been created ${file._id}`);
|
||||
resolve(file);
|
||||
|
||||
serialize(file).then(serializedFile => {
|
||||
pack(file).then(serializedFile => {
|
||||
// Publish drive_file_created event
|
||||
event(user._id, 'drive_file_created', serializedFile);
|
||||
publishDriveStream(user._id, 'file_created', serializedFile);
|
||||
|
@@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user