Mastodon use id, not username, as uid
This commit is contained in:
parent
8aef26a588
commit
9116d4a5bc
4 changed files with 4 additions and 4 deletions
|
@ -2801,7 +2801,7 @@ msgstr ""
|
|||
"你好,\n"
|
||||
"请输入如下验证码登录{email}账号:\n"
|
||||
"\n"
|
||||
"{code}\n"
|
||||
"{code}"
|
||||
|
||||
#: mastodon/models/email.py:68
|
||||
#, python-brace-format
|
||||
|
|
|
@ -2801,7 +2801,7 @@ msgstr ""
|
|||
"你好,\n"
|
||||
"請輸入如下驗證碼登錄{email}賬號:\n"
|
||||
"\n"
|
||||
"{code}\n"
|
||||
"{code}"
|
||||
|
||||
#: mastodon/models/email.py:68
|
||||
#, python-brace-format
|
||||
|
|
|
@ -775,7 +775,7 @@ class MastodonAccount(SocialAccount):
|
|||
logger.warning(f"Refresh mastodon data error {code} for {self}")
|
||||
return False
|
||||
handle = f"{mastodon_account['username']}@{self.domain}"
|
||||
uid = mastodon_account["username"]
|
||||
uid = mastodon_account["id"]
|
||||
if self.uid != uid:
|
||||
if self.uid:
|
||||
logger.warning(f"user id changed {self.uid} -> {uid}")
|
||||
|
|
|
@ -20,7 +20,7 @@ class Command(BaseCommand):
|
|||
handle=f"{user.mastodon_username}@{user.mastodon_site}",
|
||||
defaults={
|
||||
"user": user,
|
||||
"uid": user.mastodon_username,
|
||||
"uid": user.mastodon_id,
|
||||
"domain": user.mastodon_site,
|
||||
"created": user.date_joined,
|
||||
"last_refresh": user.mastodon_last_refresh,
|
||||
|
|
Loading…
Add table
Reference in a new issue