小改 TGUserInfo 返回的 display name 格式

- 将 first name 和 last name 合并为 display name 栏目
This commit is contained in:
A.C.Sukazyo Eyre 2022-05-25 10:34:00 +08:00
parent 7ae339f47a
commit 88cc868c90
Signed by: Eyre_S
GPG Key ID: EFB47D98FE082FAD
3 changed files with 11 additions and 25 deletions

View File

@ -1,6 +1,6 @@
## Core
VERSION = 0.7.0.11
VERSION = 0.7.0.12
# dependencies

View File

@ -4,6 +4,6 @@ package cc.sukazyo.cono.morny;
* the final field that will be updated by gradle automatically.
*/
public class GradleProjectConfigures {
public static final String VERSION = "0.7.0.11";
public static final long COMPILE_TIMESTAMP = 1653443614307L;
public static final String VERSION = "0.7.0.12";
public static final long COMPILE_TIMESTAMP = 1653445911339L;
}

View File

@ -60,28 +60,14 @@ public class TelegramUserInformation {
if (dataCenter == null) { userInformation.append("\ndatacenter : <u>null</u>"); }
else { userInformation.append(String.format("\ndatacenter : <code>%s</code>", escapeHtml(dataCenter))); }
}
if (user.firstName() == null) {
userInformation.append("\nfirstname : <u>null</u>");
} else {
userInformation.append(String.format(
"""
firstname :
- <code>%s</code>""",
escapeHtml(user.firstName())
));
}
if (user.lastName() == null) {
userInformation.append("\nlastname : <u>null</u>");
} else {
userInformation.append(String.format(
"""
lastname :
- <code>%s</code>""",
escapeHtml(user.lastName())
));
}
userInformation.append(String.format(
"""
display name :
- <code>%s</code>%s""",
escapeHtml(user.firstName()),
user.lastName()==null ? "" : String.format("\n- <code>%s</code>", escapeHtml(user.lastName()))
));
if (user.languageCode() != null) {
userInformation.append(String.format(
"""