refactor: 简化账号列表的格式.

This commit is contained in:
LamGC 2022-08-09 18:20:37 +08:00
parent fd84a2a04b
commit 47971f7e3a
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

View File

@ -200,7 +200,7 @@ class OracleAccountManagerExtension(private val bot: BaseAbilityBot) : AbilityEx
val identityClient = IdentityClient(provider) val identityClient = IdentityClient(provider)
val text = try { val text = try {
val user = identityClient.getUser(provider.userId) val user = identityClient.getUser(provider.userId)
"${account.name} / ${user.name}${user.email}${account.regionId}" "${account.name} / ${user.email}${account.regionId}"
} catch (e: BmcException) { } catch (e: BmcException) {
"${account.name} / null 【${account.regionId}" "${account.name} / null 【${account.regionId}"
} }
@ -219,8 +219,7 @@ class OracleAccountManagerExtension(private val bot: BaseAbilityBot) : AbilityEx
) )
} }
val text = """ val text = """
当前 Telegram 用户已绑定以下 Oracle 账号 当前 Telegram 用户已绑定以下 Oracle 账号
账号没有名字只有邮箱是因为通过 API 获取名字失败
""".trimIndent() """.trimIndent()
if (messageId == null) { if (messageId == null) {