ダイレクト投稿でユーザーが指定されていなかったらrejectする (#3724)
This commit is contained in:
		
							parent
							
								
									c9c2853150
								
							
						
					
					
						commit
						98acf919f1
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -188,6 +188,11 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
 | 
				
			||||||
				data.visibleUsers.push(u);
 | 
									data.visibleUsers.push(u);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// ダイレクト投稿でユーザーが指定されていなかったらreject
 | 
				
			||||||
 | 
							if (data.visibleUsers.length === 0) {
 | 
				
			||||||
 | 
								return rej('Target user is not specified');
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const note = await insertNote(user, data, tags, emojis, mentionedUsers);
 | 
						const note = await insertNote(user, data, tags, emojis, mentionedUsers);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue