Fix: can not update remote Misskey user (#3731)
This commit is contained in:
		
							parent
							
								
									6b947c2139
								
							
						
					
					
						commit
						49921f2dcf
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -165,7 +165,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<IU
 | 
				
			||||||
				publicKeyPem: person.publicKey.publicKeyPem
 | 
									publicKeyPem: person.publicKey.publicKeyPem
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			inbox: person.inbox,
 | 
								inbox: person.inbox,
 | 
				
			||||||
			sharedInbox: person.sharedInbox || person.endpoints ? person.endpoints.sharedInbox : undefined,
 | 
								sharedInbox: person.sharedInbox || (person.endpoints ? person.endpoints.sharedInbox : undefined),
 | 
				
			||||||
			featured: person.featured,
 | 
								featured: person.featured,
 | 
				
			||||||
			endpoints: person.endpoints,
 | 
								endpoints: person.endpoints,
 | 
				
			||||||
			uri: person.id,
 | 
								uri: person.id,
 | 
				
			||||||
| 
						 | 
					@ -341,7 +341,7 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje
 | 
				
			||||||
		$set: {
 | 
							$set: {
 | 
				
			||||||
			lastFetchedAt: new Date(),
 | 
								lastFetchedAt: new Date(),
 | 
				
			||||||
			inbox: person.inbox,
 | 
								inbox: person.inbox,
 | 
				
			||||||
			sharedInbox: person.sharedInbox || person.endpoints ? person.endpoints.sharedInbox : undefined,
 | 
								sharedInbox: person.sharedInbox || (person.endpoints ? person.endpoints.sharedInbox : undefined),
 | 
				
			||||||
			featured: person.featured,
 | 
								featured: person.featured,
 | 
				
			||||||
			avatarId: avatar ? avatar._id : null,
 | 
								avatarId: avatar ? avatar._id : null,
 | 
				
			||||||
			bannerId: banner ? banner._id : null,
 | 
								bannerId: banner ? banner._id : null,
 | 
				
			||||||
| 
						 | 
					@ -374,7 +374,7 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje
 | 
				
			||||||
		followerId: exist._id
 | 
							followerId: exist._id
 | 
				
			||||||
	}, {
 | 
						}, {
 | 
				
			||||||
		$set: {
 | 
							$set: {
 | 
				
			||||||
			'_follower.sharedInbox': person.sharedInbox || person.endpoints ? person.endpoints.sharedInbox : undefined
 | 
								'_follower.sharedInbox': person.sharedInbox || (person.endpoints ? person.endpoints.sharedInbox : undefined)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	});
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue