diff --git a/locale/zh_Hans/LC_MESSAGES/django.po b/locale/zh_Hans/LC_MESSAGES/django.po index eb30cce5..ea772c9b 100644 --- a/locale/zh_Hans/LC_MESSAGES/django.po +++ b/locale/zh_Hans/LC_MESSAGES/django.po @@ -2801,7 +2801,7 @@ msgstr "" "你好,\n" "请输入如下验证码登录{email}账号:\n" "\n" -"{code}\n" +"{code}" #: mastodon/models/email.py:68 #, python-brace-format diff --git a/locale/zh_Hant/LC_MESSAGES/django.po b/locale/zh_Hant/LC_MESSAGES/django.po index 2a613a08..fdab0fe0 100644 --- a/locale/zh_Hant/LC_MESSAGES/django.po +++ b/locale/zh_Hant/LC_MESSAGES/django.po @@ -2801,7 +2801,7 @@ msgstr "" "你好,\n" "請輸入如下驗證碼登錄{email}賬號:\n" "\n" -"{code}\n" +"{code}" #: mastodon/models/email.py:68 #, python-brace-format diff --git a/mastodon/models/mastodon.py b/mastodon/models/mastodon.py index 073a8f8d..d1640351 100644 --- a/mastodon/models/mastodon.py +++ b/mastodon/models/mastodon.py @@ -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}") diff --git a/users/management/commands/migrate_mastodon.py b/users/management/commands/migrate_mastodon.py index c9a3d8ab..d167f499 100644 --- a/users/management/commands/migrate_mastodon.py +++ b/users/management/commands/migrate_mastodon.py @@ -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,