mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 15:34:13 +00:00 
			
		
		
		
	Fix bug
This commit is contained in:
		
							parent
							
								
									ce0f6f7ebe
								
							
						
					
					
						commit
						e691524416
					
				
					 1 changed files with 11 additions and 12 deletions
				
			
		| 
						 | 
					@ -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 it is renote
 | 
				
			||||||
	if (data.renote) {
 | 
						if (data.renote) {
 | 
				
			||||||
		// Notify
 | 
					 | 
				
			||||||
		const type = data.text ? 'quote' : 'renote';
 | 
							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
 | 
							// Fetch watchers
 | 
				
			||||||
		nmRelatedPromises.push(notifyToWatchersOfRenotee(data.renote, user, nm, type));
 | 
							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);
 | 
								watch(user._id, data.renote);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// If it is quote renote
 | 
							// Publish event
 | 
				
			||||||
		if (data.text) {
 | 
							if (!user._id.equals(data.renote.userId)) {
 | 
				
			||||||
			// Add mention
 | 
								publishUserStream(data.renote.userId, 'renote', noteObj);
 | 
				
			||||||
			nm.push(data.renote.userId, 'quote');
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			// Publish event
 | 
					 | 
				
			||||||
			if (!user._id.equals(data.renote.userId)) {
 | 
					 | 
				
			||||||
				publishUserStream(data.renote.userId, 'renote', noteObj);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue