diff --git a/gradle.properties b/gradle.properties index b211493..097003d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ ## Core -VERSION = 0.7.0.11 +VERSION = 0.7.0.12 # dependencies diff --git a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java index b304e90..c9bbcf6 100644 --- a/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java +++ b/src/main/java/cc/sukazyo/cono/morny/GradleProjectConfigures.java @@ -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; } diff --git a/src/main/java/cc/sukazyo/cono/morny/util/TelegramUserInformation.java b/src/main/java/cc/sukazyo/cono/morny/util/TelegramUserInformation.java index 4d0126d..efa3257 100644 --- a/src/main/java/cc/sukazyo/cono/morny/util/TelegramUserInformation.java +++ b/src/main/java/cc/sukazyo/cono/morny/util/TelegramUserInformation.java @@ -60,28 +60,14 @@ public class TelegramUserInformation { if (dataCenter == null) { userInformation.append("\ndatacenter : null"); } else { userInformation.append(String.format("\ndatacenter : %s", escapeHtml(dataCenter))); } } - if (user.firstName() == null) { - userInformation.append("\nfirstname : null"); - } else { - userInformation.append(String.format( - """ - - firstname : - - %s""", - escapeHtml(user.firstName()) - )); - } - if (user.lastName() == null) { - userInformation.append("\nlastname : null"); - } else { - userInformation.append(String.format( - """ - - lastname : - - %s""", - escapeHtml(user.lastName()) - )); - } + userInformation.append(String.format( + """ + + display name : + - %s%s""", + escapeHtml(user.firstName()), + user.lastName()==null ? "" : String.format("\n- %s", escapeHtml(user.lastName())) + )); if (user.languageCode() != null) { userInformation.append(String.format( """