diff options
| author | dakkar <dakkar@thenautilus.net> | 2025-03-02 16:51:54 +0000 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2025-03-02 16:51:54 +0000 |
| commit | 0fba8dc26ac39d82b5add1756e555070bf18eb52 (patch) | |
| tree | 1c5a5a4a16787822e208e13dcaa5789627fa3416 /packages/backend/src/core/AccountMoveService.ts | |
| parent | handle scheduled notes when migrating account - fixes #931 (diff) | |
| download | sharkey-0fba8dc26ac39d82b5add1756e555070bf18eb52.tar.gz sharkey-0fba8dc26ac39d82b5add1756e555070bf18eb52.tar.bz2 sharkey-0fba8dc26ac39d82b5add1756e555070bf18eb52.zip | |
don't move scheduled notes to new account when migrating
@Julia confirms it would confuse people more than it helps
Diffstat (limited to 'packages/backend/src/core/AccountMoveService.ts')
| -rw-r--r-- | packages/backend/src/core/AccountMoveService.ts | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/packages/backend/src/core/AccountMoveService.ts b/packages/backend/src/core/AccountMoveService.ts index 0eb8a76bff..e24fefb4b5 100644 --- a/packages/backend/src/core/AccountMoveService.ts +++ b/packages/backend/src/core/AccountMoveService.ts @@ -122,7 +122,7 @@ export class AccountMoveService { await Promise.all([ this.copyBlocking(src, dst), this.copyMutings(src, dst), - this.updateScheduledNotes(src, dst), + this.deleteScheduledNotes(src), this.updateLists(src, dst), ]); } catch { @@ -206,18 +206,7 @@ export class AccountMoveService { } @bindThis - public async updateScheduledNotes(src: ThinUser, dst: MiUser): Promise<void> { - // we're moving to a different local user: change scheduled notes' ownership - if (dst.host === null) { - await this.noteScheduleRepository.update( - { userId: src.id }, - { userId: dst.id }, - ); - - return; - } - - // we're moving to a remote user: delete scheduled notes + public async deleteScheduledNotes(src: ThinUser): Promise<void> { const scheduledNotes = await this.noteScheduleRepository.findBy({ userId: src.id, }) as MiNoteSchedule[]; |