fix Firefish
This commit is contained in:
parent
72d9fb2e42
commit
1b4c1ef87e
1 changed files with 11 additions and 0 deletions
|
@ -592,6 +592,17 @@ class Mastodon:
|
|||
uid=mastodon_account.uid,
|
||||
domain=mastodon_account.domain,
|
||||
).first()
|
||||
if not existing_account:
|
||||
existing_account = MastodonAccount.objects.filter(
|
||||
handle=mastodon_account.handle,
|
||||
domain=mastodon_account.domain,
|
||||
).first()
|
||||
if existing_account:
|
||||
# this is only needed if server is Firefish
|
||||
logger.warning(
|
||||
f"USER ID CHANGED: {existing_account.uid} -> {mastodon_account.uid} for {existing_account.handle}"
|
||||
)
|
||||
existing_account.uid = mastodon_account.uid
|
||||
if existing_account:
|
||||
existing_account.access_token = mastodon_account.access_token
|
||||
existing_account.refresh_token = mastodon_account.refresh_token
|
||||
|
|
Loading…
Add table
Reference in a new issue