diff --git a/src/BirdsiteLive.Domain/MigrationService.cs b/src/BirdsiteLive.Domain/MigrationService.cs index bc1c73e..fa19fa7 100644 --- a/src/BirdsiteLive.Domain/MigrationService.cs +++ b/src/BirdsiteLive.Domain/MigrationService.cs @@ -105,7 +105,7 @@ namespace BirdsiteLive.Domain return result; } - public async Task MigrateAccountAsync(ValidatedFediverseUser validatedUser, string acct, bool notify) + public async Task MigrateAccountAsync(ValidatedFediverseUser validatedUser, string acct) { // Apply moved to var twitterAccount = await _twitterUserDal.GetTwitterUserAsync(acct); @@ -120,14 +120,11 @@ namespace BirdsiteLive.Domain await _twitterUserDal.UpdateTwitterUserAsync(twitterAccount); // Notify Followers - if (notify) - { - var message = $@"

[BSL MIRROR SERVICE NOTIFICATION]
+ var message = $@"

[BSL MIRROR SERVICE NOTIFICATION]
This bot has been disabled by it's original owner.
It has been redirected to {validatedUser.FediverseAcct}.

"; - NotifyFollowers(acct, twitterAccount, message); - } + NotifyFollowers(acct, twitterAccount, message); } private void NotifyFollowers(string acct, SyncTwitterUser twitterAccount, string message) @@ -172,7 +169,7 @@ namespace BirdsiteLive.Domain }); } - public async Task DeleteAccountAsync(string acct, bool notify) + public async Task DeleteAccountAsync(string acct) { // Apply moved to var twitterAccount = await _twitterUserDal.GetTwitterUserAsync(acct); @@ -184,16 +181,12 @@ namespace BirdsiteLive.Domain twitterAccount.Deleted = true; await _twitterUserDal.UpdateTwitterUserAsync(twitterAccount); - - + // Notify Followers - if (notify) - { - var message = $@"

[BSL MIRROR SERVICE NOTIFICATION]
+ var message = $@"

[BSL MIRROR SERVICE NOTIFICATION]
This bot has been deleted by it's original owner.

"; - NotifyFollowers(acct, twitterAccount, message); - } + NotifyFollowers(acct, twitterAccount, message); } public async Task TriggerRemoteMigrationAsync(string id, string tweetid, string handle) diff --git a/src/BirdsiteLive/Controllers/MigrationController.cs b/src/BirdsiteLive/Controllers/MigrationController.cs index 0c1d580..00d5fb7 100644 --- a/src/BirdsiteLive/Controllers/MigrationController.cs +++ b/src/BirdsiteLive/Controllers/MigrationController.cs @@ -85,7 +85,7 @@ namespace BirdsiteLive.Controllers { try { - await _migrationService.MigrateAccountAsync(fediverseUserValidation, id, true); + await _migrationService.MigrateAccountAsync(fediverseUserValidation, id); await _migrationService.TriggerRemoteMigrationAsync(id, tweetid, handle); data.MigrationSuccess = true; } @@ -129,7 +129,7 @@ namespace BirdsiteLive.Controllers { try { - await _migrationService.DeleteAccountAsync(id, true); + await _migrationService.DeleteAccountAsync(id); await _migrationService.TriggerRemoteDeleteAsync(id, tweetid); data.MigrationSuccess = true; } @@ -152,7 +152,7 @@ namespace BirdsiteLive.Controllers if (fediverseUserValidation.IsValid && isTweetValid) { - await _migrationService.MigrateAccountAsync(fediverseUserValidation, id, false); + await _migrationService.MigrateAccountAsync(fediverseUserValidation, id); return Ok(); } @@ -167,7 +167,7 @@ namespace BirdsiteLive.Controllers if (isTweetValid) { - await _migrationService.DeleteAccountAsync(id, true); + await _migrationService.DeleteAccountAsync(id); return Ok(); }