Поправил вывод описания нового проекта

This commit is contained in:
Struchkov Mark 2023-02-15 21:52:35 +03:00
parent c3fd063880
commit 7f13cef76d
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
3 changed files with 8 additions and 8 deletions

View File

@ -107,13 +107,13 @@
<dependency>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-utils</artifactId>
<version>2.3.4</version>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-exception</artifactId>
<version>2.3.4</version>
<version>2.5.0</version>
</dependency>
<dependency>

View File

@ -27,11 +27,10 @@ public class StartNotify {
final BoxAnswer boxAnswer = BoxAnswer.builder()
.recipientPersonId(personProperty.getTelegramId())
.message(
new StringBuilder()
.append("Hello. I wish you a productive day :)")
.append("\n-- -- -- -- --\n")
.append("Version ").append(appProperty.getVersion()).append(" | Developer: [uPagge](https://mark.struchkov.dev)")
.toString()
"Hello. I wish you a productive work day \uD83C\uDF40" +
"\n-- -- -- -- --\n" +
"Version " + appProperty.getVersion() +
"\nDeveloper: [uPagge](https://mark.struchkov.dev)"
).build();
sending.send(boxAnswer);

View File

@ -4,6 +4,7 @@ import dev.struchkov.bot.gitlab.context.domain.notify.project.NewProjectNotify;
import dev.struchkov.bot.gitlab.context.utils.Icons;
import dev.struchkov.bot.gitlab.telegram.utils.Const;
import dev.struchkov.godfather.main.domain.BoxAnswer;
import dev.struchkov.haiti.utils.Checker;
import dev.struchkov.haiti.utils.Strings;
import org.springframework.stereotype.Component;
@ -23,7 +24,7 @@ public class NewProjectNotifyGenerator implements NotifyBoxAnswerGenerator<NewPr
@Override
public BoxAnswer generate(NewProjectNotify notify) {
final Optional<String> optDescription = Optional.ofNullable(notify.getProjectDescription())
.filter(Strings.EMPTY::equals)
.filter(Checker::checkNotBlank)
.map(Strings::escapeMarkdown);
final StringBuilder builder = new StringBuilder(Icons.FUN).append("* New project*")