Merge remote-tracking branch 'misskey-dev/develop' into io

This commit is contained in:
まっちゃとーにゅ 2024-03-19 06:43:53 +09:00
commit 96714cea97
No known key found for this signature in database
GPG key ID: 6AFBBF529601C1DB
8 changed files with 316 additions and 154 deletions

View file

@ -510,6 +510,12 @@ export class UserFollowingService implements OnModuleInit {
if (blocking) throw new Error('blocking');
if (blocked) throw new Error('blocked');
// Remove old follow requests before creating a new one.
await this.followRequestsRepository.delete({
followeeId: followee.id,
followerId: follower.id,
});
const followRequest = await this.followRequestsRepository.insert({
id: this.idService.gen(),
followerId: follower.id,