Fixed locale when sending as a chat

This commit is contained in:
Profitroll 2023-08-23 10:34:45 +02:00
parent 9e00d38877
commit dfd39f47db
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2

View File

@ -117,6 +117,8 @@ class PyroGroup:
def select_locale(
self, app: PyroClient, user: User, ignore_auto: bool = False
) -> str:
if user is None:
return app.default_locale
if not ignore_auto and self.locale_auto is True:
if user.language_code is not None:
return user.language_code