Fix: Block delivery (#9397)
* Fix: Block delivery * Fix: Block delivery -
This commit is contained in:
		
							parent
							
								
									d106fb39ab
								
							
						
					
					
						commit
						50e3839b60
					
				
					 1 changed files with 11 additions and 5 deletions
				
			
		|  | @ -169,6 +169,12 @@ export class UserBlockingService { | ||||||
| 			const content = this.apRendererService.renderActivity(this.apRendererService.renderUndo(this.apRendererService.renderFollow(follower, followee), follower)); | 			const content = this.apRendererService.renderActivity(this.apRendererService.renderUndo(this.apRendererService.renderFollow(follower, followee), follower)); | ||||||
| 			this.queueService.deliver(follower, content, followee.inbox); | 			this.queueService.deliver(follower, content, followee.inbox); | ||||||
| 		} | 		} | ||||||
|  | 
 | ||||||
|  | 		// リモートからフォローをされていたらRejectFollow送信
 | ||||||
|  | 		if (this.userEntityService.isLocalUser(followee) && this.userEntityService.isRemoteUser(follower)) { | ||||||
|  | 			const content = this.apRendererService.renderActivity(this.apRendererService.renderReject(this.apRendererService.renderFollow(follower, followee), followee)); | ||||||
|  | 			this.queueService.deliver(followee, content, follower.inbox); | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	@bindThis | 	@bindThis | ||||||
|  | @ -191,23 +197,23 @@ export class UserBlockingService { | ||||||
| 			blockerId: blocker.id, | 			blockerId: blocker.id, | ||||||
| 			blockeeId: blockee.id, | 			blockeeId: blockee.id, | ||||||
| 		}); | 		}); | ||||||
| 	 | 
 | ||||||
| 		if (blocking == null) { | 		if (blocking == null) { | ||||||
| 			this.logger.warn('ブロック解除がリクエストされましたがブロックしていませんでした'); | 			this.logger.warn('ブロック解除がリクエストされましたがブロックしていませんでした'); | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 	 | 
 | ||||||
| 		// Since we already have the blocker and blockee, we do not need to fetch
 | 		// Since we already have the blocker and blockee, we do not need to fetch
 | ||||||
| 		// them in the query above and can just manually insert them here.
 | 		// them in the query above and can just manually insert them here.
 | ||||||
| 		blocking.blocker = blocker; | 		blocking.blocker = blocker; | ||||||
| 		blocking.blockee = blockee; | 		blocking.blockee = blockee; | ||||||
| 	 | 
 | ||||||
| 		await this.blockingsRepository.delete(blocking.id); | 		await this.blockingsRepository.delete(blocking.id); | ||||||
| 	 | 
 | ||||||
| 		// deliver if remote bloking
 | 		// deliver if remote bloking
 | ||||||
| 		if (this.userEntityService.isLocalUser(blocker) && this.userEntityService.isRemoteUser(blockee)) { | 		if (this.userEntityService.isLocalUser(blocker) && this.userEntityService.isRemoteUser(blockee)) { | ||||||
| 			const content = this.apRendererService.renderActivity(this.apRendererService.renderUndo(this.apRendererService.renderBlock(blocking), blocker)); | 			const content = this.apRendererService.renderActivity(this.apRendererService.renderUndo(this.apRendererService.renderBlock(blocking), blocker)); | ||||||
| 			this.queueService.deliver(blocker, content, blockee.inbox); | 			this.queueService.deliver(blocker, content, blockee.inbox); | ||||||
| 		} | 		} | ||||||
| 	}	 | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue