非公開の投稿に自分以外が返信したりRenoteしたりできないように
This commit is contained in:
		
							parent
							
								
									84a4174883
								
							
						
					
					
						commit
						10f9549a04
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
					@ -111,6 +111,16 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
 | 
				
			||||||
		return rej();
 | 
							return rej();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// リプライ先が自分以外の非公開の投稿なら禁止
 | 
				
			||||||
 | 
						if (data.reply && data.reply.visibility == 'private' && !data.reply.userId.equals(user._id)) {
 | 
				
			||||||
 | 
							return rej();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Renote先が自分以外の非公開の投稿なら禁止
 | 
				
			||||||
 | 
						if (data.renote && data.renote.visibility == 'private' && !data.renote.userId.equals(user._id)) {
 | 
				
			||||||
 | 
							return rej();
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (data.text) {
 | 
						if (data.text) {
 | 
				
			||||||
		data.text = data.text.trim();
 | 
							data.text = data.text.trim();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue