check movedToUri when receiving a follow request

This commit is contained in:
Namekuji 2023-04-14 10:02:01 -04:00
parent fc327f0567
commit 942d5b6672

View File

@ -145,7 +145,9 @@ export class UserFollowingService implements OnModuleInit {
try { try {
await this.apPersonService.updatePerson(oldUri); await this.apPersonService.updatePerson(oldUri);
const oldAccount = await this.apPersonService.resolvePerson(oldUri); const oldAccount = await this.apPersonService.resolvePerson(oldUri);
autoAccept = await this.followingsRepository.exist({ const newUri = this.userEntityService.isRemoteUser(follower) ? follower.uri : `${this.config.url}/users/${follower.id}`;
autoAccept = oldAccount.movedToUri === newUri && await this.followingsRepository.exist({
where: { where: {
followeeId: followee.id, followeeId: followee.id,
followerId: oldAccount.id, followerId: oldAccount.id,