Поправил вывод описания нового проекта
This commit is contained in:
parent
c3fd063880
commit
7f13cef76d
4
pom.xml
4
pom.xml
@ -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>
|
||||
|
@ -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);
|
||||
|
@ -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*")
|
||||
|
Loading…
Reference in New Issue
Block a user