This commit is contained in:
Alexander Kalinovsky committed 2025-02-01 20:21:55 +01:00
1 parent a22ab9b0de
commit 1ca90c633f
6 files changed
+16 -9

No files matched your search

+1 -1
View File
@@ -20,5 +20,5 @@ class I18nMiddleware(SimpleI18nMiddleware):
if db_session and event.model_fields.get("from_user"):
user = await self.user_class.get(id=event.from_user.id, session=db_session)
if user and user.lang:
return user.lang
return user.lang.value
return await super().get_locale(event=event, data=data)