mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	もともとセンシティブではないと連合されていたファイルがセンシティブとして連合された場合にセンシティブとしてそのファイルを扱うように (#13879)
* feat(backend): mark an file as sensitive if the file was newly federated as sensitive * docs(changelog): もともとセンシティブではないと連合されていたファイルがセンシティブとして連合された場合にセンシティブとしてそのファイルを扱うように * fix: change way to update federated image * Update packages/backend/src/core/DriveService.ts Co-authored-by: Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com> * update isSensitive of existing record object --------- Co-authored-by: Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									cf2256cf41
								
							
						
					
					
						commit
						a7a8dc4dbb
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -96,6 +96,8 @@
 | 
				
			||||||
- Fix: `/i/notifications`に `includeTypes`か`excludeTypes`を指定しているとき、通知が存在するのに空配列を返すことがある問題を修正
 | 
					- Fix: `/i/notifications`に `includeTypes`か`excludeTypes`を指定しているとき、通知が存在するのに空配列を返すことがある問題を修正
 | 
				
			||||||
- Fix: 複数idを指定する`users/show`が関係ないユーザを返すことがある問題を修正
 | 
					- Fix: 複数idを指定する`users/show`が関係ないユーザを返すことがある問題を修正
 | 
				
			||||||
- Fix: `/tags` と `/user-tags` が検索エンジンにインデックスされないように
 | 
					- Fix: `/tags` と `/user-tags` が検索エンジンにインデックスされないように
 | 
				
			||||||
 | 
					- Fix: もともとセンシティブではないと連合されていたファイルがセンシティブとして連合された場合にセンシティブとしてそのファイルを扱うように
 | 
				
			||||||
 | 
					  - センシティブとして連合したファイルは非センシティブとして連合されてもセンシティブとして扱われます
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 2024.3.1
 | 
					## 2024.3.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -504,6 +504,12 @@ export class DriveService {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (much) {
 | 
								if (much) {
 | 
				
			||||||
				this.registerLogger.info(`file with same hash is found: ${much.id}`);
 | 
									this.registerLogger.info(`file with same hash is found: ${much.id}`);
 | 
				
			||||||
 | 
									if (sensitive && !much.isSensitive) {
 | 
				
			||||||
 | 
										// The file is federated as sensitive for this time, but was federated as non-sensitive before.
 | 
				
			||||||
 | 
										// Therefore, update the file to sensitive.
 | 
				
			||||||
 | 
										await this.driveFilesRepository.update({ id: much.id }, { isSensitive: true });
 | 
				
			||||||
 | 
										much.isSensitive = true;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
				return much;
 | 
									return much;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue