dev@locazia: add User.front_format

This commit is contained in:
user 2024-02-29 01:41:39 +03:00
parent 994374a087
commit ef2419d8ea
2 changed files with 8 additions and 1 deletions

View File

@ -14,7 +14,8 @@ main_router = Router()
async def send_home_menu(chat_wrap, user, wallet_connection, **kwargs):
return await tg_process_template(
chat_wrap, user.translated('home_menu').format(
wallet_address=wallet_connection.wallet_address
wallet_address=wallet_connection.wallet_address,
name=user.front_format(plain_text=True),
), keyboard=get_inline_keyboard([
[{
'text': user.translated('ownedContent_button'),

View File

@ -9,3 +9,9 @@ class DisplayMixin:
"last_use": self.last_use.isoformat(),
"created": self.created.isoformat()
}
def front_format(self, plaint_text=True):
if not plaint_text:
raise NotImplementedError
return f"{self.first_name} {self.last_name}".strip()