Fixed locale when sending as a chat
This commit is contained in:
parent
9e00d38877
commit
dfd39f47db
@ -117,6 +117,8 @@ class PyroGroup:
|
|||||||
def select_locale(
|
def select_locale(
|
||||||
self, app: PyroClient, user: User, ignore_auto: bool = False
|
self, app: PyroClient, user: User, ignore_auto: bool = False
|
||||||
) -> str:
|
) -> str:
|
||||||
|
if user is None:
|
||||||
|
return app.default_locale
|
||||||
if not ignore_auto and self.locale_auto is True:
|
if not ignore_auto and self.locale_auto is True:
|
||||||
if user.language_code is not None:
|
if user.language_code is not None:
|
||||||
return user.language_code
|
return user.language_code
|
||||||
|
Reference in New Issue
Block a user