Resolve #2253
This commit is contained in:
		
							parent
							
								
									741efa1a9a
								
							
						
					
					
						commit
						a0f8c7e94e
					
				
					 3 changed files with 15 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -133,6 +133,7 @@ export default prop => ({
 | 
			
		|||
 | 
			
		||||
				case 'deleted': {
 | 
			
		||||
					Vue.set(this.$_ns_target, 'deletedAt', body.deletedAt);
 | 
			
		||||
					Vue.set(this.$_ns_target, 'renote', null);
 | 
			
		||||
					this.$_ns_target.text = null;
 | 
			
		||||
					this.$_ns_target.tags = [];
 | 
			
		||||
					this.$_ns_target.fileIds = [];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,12 +30,25 @@ export default async function(user: IUser, note: INote) {
 | 
			
		|||
			text: null,
 | 
			
		||||
			tags: [],
 | 
			
		||||
			fileIds: [],
 | 
			
		||||
			renoteId: null,
 | 
			
		||||
			poll: null,
 | 
			
		||||
			geo: null,
 | 
			
		||||
			cw: null
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	if (note.renoteId) {
 | 
			
		||||
		Note.update({ _id: note.renoteId }, {
 | 
			
		||||
			$inc: {
 | 
			
		||||
				renoteCount: -1,
 | 
			
		||||
				score: -1
 | 
			
		||||
			},
 | 
			
		||||
			$pull: {
 | 
			
		||||
				_quoteIds: note._id
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	publishNoteStream(note._id, 'deleted', {
 | 
			
		||||
		deletedAt: deletedAt
 | 
			
		||||
	});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue