✨
This commit is contained in:
		
							parent
							
								
									f39adfdf87
								
							
						
					
					
						commit
						c99e864dbc
					
				
					 2 changed files with 16 additions and 16 deletions
				
			
		| 
						 | 
					@ -3,7 +3,7 @@ import Xev from 'xev';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const ev = new Xev();
 | 
					const ev = new Xev();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default function () {
 | 
					export default function() {
 | 
				
			||||||
	const log: any[] = [];
 | 
						const log: any[] = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const p = childProcess.fork(__dirname + '/notes-stats-child.js');
 | 
						const p = childProcess.fork(__dirname + '/notes-stats-child.js');
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -308,7 +308,7 @@ export default async (user: IUser, data: {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						// Publish event to followers stream
 | 
											// Publish event to followers stream
 | 
				
			||||||
						stream(following.followerId, 'note', noteObj);
 | 
											stream(following.followerId, 'note', noteObj);
 | 
				
			||||||
						
 | 
					
 | 
				
			||||||
						if (isRemoteUser(user) || note.visibility != 'public') {
 | 
											if (isRemoteUser(user) || note.visibility != 'public') {
 | 
				
			||||||
							publishHybridTimelineStream(following.followerId, noteObj);
 | 
												publishHybridTimelineStream(following.followerId, noteObj);
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
| 
						 | 
					@ -363,14 +363,14 @@ export default async (user: IUser, data: {
 | 
				
			||||||
			// 削除されたドキュメントは除く
 | 
								// 削除されたドキュメントは除く
 | 
				
			||||||
			deletedAt: { $exists: false }
 | 
								deletedAt: { $exists: false }
 | 
				
			||||||
		}, {
 | 
							}, {
 | 
				
			||||||
			fields: {
 | 
									fields: {
 | 
				
			||||||
				userId: true
 | 
										userId: true
 | 
				
			||||||
			}
 | 
									}
 | 
				
			||||||
		}).then(watchers => {
 | 
								}).then(watchers => {
 | 
				
			||||||
			watchers.forEach(watcher => {
 | 
									watchers.forEach(watcher => {
 | 
				
			||||||
				nm.push(watcher.userId, 'reply');
 | 
										nm.push(watcher.userId, 'reply');
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		});
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// この投稿をWatchする
 | 
							// この投稿をWatchする
 | 
				
			||||||
		if (isLocalUser(user) && user.settings.autoWatch !== false) {
 | 
							if (isLocalUser(user) && user.settings.autoWatch !== false) {
 | 
				
			||||||
| 
						 | 
					@ -392,14 +392,14 @@ export default async (user: IUser, data: {
 | 
				
			||||||
			noteId: data.renote._id,
 | 
								noteId: data.renote._id,
 | 
				
			||||||
			userId: { $ne: user._id }
 | 
								userId: { $ne: user._id }
 | 
				
			||||||
		}, {
 | 
							}, {
 | 
				
			||||||
			fields: {
 | 
									fields: {
 | 
				
			||||||
				userId: true
 | 
										userId: true
 | 
				
			||||||
			}
 | 
									}
 | 
				
			||||||
		}).then(watchers => {
 | 
								}).then(watchers => {
 | 
				
			||||||
			watchers.forEach(watcher => {
 | 
									watchers.forEach(watcher => {
 | 
				
			||||||
				nm.push(watcher.userId, type);
 | 
										nm.push(watcher.userId, type);
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
		});
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// この投稿をWatchする
 | 
							// この投稿をWatchする
 | 
				
			||||||
		if (isLocalUser(user) && user.settings.autoWatch !== false) {
 | 
							if (isLocalUser(user) && user.settings.autoWatch !== false) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue