dev@locazia: add User.front_format
This commit is contained in:
parent
994374a087
commit
ef2419d8ea
|
|
@ -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'),
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
Loading…
Reference in New Issue