added better blacklisting handling

This commit is contained in:
Nicolas Constant 2022-11-04 03:14:00 -04:00
parent df68b9c370
commit 4fb04c16b8
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688

View file

@ -95,10 +95,17 @@ namespace BirdsiteLive.Domain
{
// Apply moved to
var twitterAccount = await _twitterUserDal.GetTwitterUserAsync(acct);
twitterAccount.MovedTo = validatedUser.ObjectId;
twitterAccount.MovedToAcct = validatedUser.FediverseAcct;
await _twitterUserDal.UpdateTwitterUserAsync(twitterAccount);
if (twitterAccount == null)
{
await _twitterUserDal.CreateTwitterUserAsync(acct, -1, validatedUser.ObjectId, validatedUser.FediverseAcct);
}
else
{
twitterAccount.MovedTo = validatedUser.ObjectId;
twitterAccount.MovedToAcct = validatedUser.FediverseAcct;
await _twitterUserDal.UpdateTwitterUserAsync(twitterAccount);
}
// Notify Followers
var t = Task.Run(async () =>
{