fix(client): make note visibility inheritance behave correctly when default is set to followers-only (#9238)
* Fix post visibility * Also in the case of specified * fix Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
		
							parent
							
								
									66513b9893
								
							
						
					
					
						commit
						2037c83541
					
				
					 1 changed files with 16 additions and 7 deletions
				
			
		|  | @ -262,13 +262,22 @@ if (props.channel) { | ||||||
| 
 | 
 | ||||||
| // 公開以外へのリプライ時は元の公開範囲を引き継ぐ | // 公開以外へのリプライ時は元の公開範囲を引き継ぐ | ||||||
| if (props.reply && ['home', 'followers', 'specified'].includes(props.reply.visibility)) { | if (props.reply && ['home', 'followers', 'specified'].includes(props.reply.visibility)) { | ||||||
| 	visibility = props.reply.visibility; | 	if (props.reply.visibility === 'home' && visibility === 'followers') { | ||||||
| 	if (props.reply.visibility === 'specified') { | 		visibility = 'followers'; | ||||||
| 		os.api('users/show', { | 	} else if (['home', 'followers'].includes(props.reply.visibility) && visibility === 'specified') { | ||||||
| 			userIds: props.reply.visibleUserIds.filter(uid => uid !== $i.id && uid !== props.reply.userId), | 		visibility = 'specified'; | ||||||
| 		}).then(users => { | 	} else { | ||||||
| 			users.forEach(pushVisibleUser); | 		visibility = props.reply.visibility; | ||||||
| 		}); | 	} | ||||||
|  | 
 | ||||||
|  | 	if (visibility === 'specified') { | ||||||
|  | 		if (props.reply.visibleUserIds) { | ||||||
|  | 			os.api('users/show', { | ||||||
|  | 				userIds: props.reply.visibleUserIds.filter(uid => uid !== $i.id && uid !== props.reply.userId), | ||||||
|  | 			}).then(users => { | ||||||
|  | 				users.forEach(pushVisibleUser); | ||||||
|  | 			}); | ||||||
|  | 		} | ||||||
| 
 | 
 | ||||||
| 		if (props.reply.userId !== $i.id) { | 		if (props.reply.userId !== $i.id) { | ||||||
| 			os.api('users/show', { userId: props.reply.userId }).then(user => { | 			os.api('users/show', { userId: props.reply.userId }).then(user => { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue