mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-04 08:22:26 +00:00
limit flair length
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
from typing import Tuple
|
||||
import json
|
||||
import matplotlib.pyplot as plt
|
||||
import openbb_terminal.account.local_model as Local
|
||||
import openbb_terminal.account.hub_model as Hub
|
||||
from openbb_terminal.account.user import User
|
||||
from openbb_terminal.core.config.paths import PACKAGE_DIRECTORY
|
||||
from openbb_terminal.helper_funcs import system_clear
|
||||
import matplotlib.pyplot as plt
|
||||
from openbb_terminal.rich_config import console
|
||||
from openbb_terminal import terminal_controller
|
||||
|
||||
|
||||
@@ -28,9 +28,11 @@ class User:
|
||||
decoded_info = jwt.decode(User.TOKEN, options={"verify_signature": False})
|
||||
User.EMAIL = decoded_info.get("sub", "")
|
||||
|
||||
MAX_FLAIR_LEN = 20
|
||||
|
||||
if obbff.USE_FLAIR == ":openbb":
|
||||
username = User.EMAIL[: User.EMAIL.find("@")]
|
||||
setattr(obbff, "USE_FLAIR", "[" + username + "] 🦋")
|
||||
setattr(obbff, "USE_FLAIR", "[" + username[:MAX_FLAIR_LEN] + "] 🦋")
|
||||
|
||||
@classmethod
|
||||
def whoami(cls):
|
||||
|
||||
Reference in New Issue
Block a user