Skip to content

Commit

Permalink
trimEnd in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
demidko committed Jan 6, 2025
1 parent adaaf03 commit 0ba4971
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/main/kotlin/com/github/demidko/glock/GlockBot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ class GlockBot(
append('@').append(username).append(' ')
}
}
trimEnd(' ')
}
}.trimEnd()
}

private fun format(chat: Chat): String {
Expand All @@ -151,17 +150,16 @@ class GlockBot(
if (inviteLink != null) {
append(inviteLink).append(' ')
}
if (bio != null) {
if (bio?.isNotBlank() == true) {
append(bio).append(" - ")
}
if (description != null) {
if (description?.isNotBlank() == true) {
append(description).append(" - ")
}
if (pinnedMessage != null) {
if (pinnedMessage?.isNotBlank() == true) {
append(pinnedMessage).append(" - ")
}
}
trimEnd(' ', '-')
}
}.trimEnd(' ', '-')
}
}

0 comments on commit 0ba4971

Please sign in to comment.