Compare commits

...

4 Commits

Author SHA1 Message Date
fd7c53060a
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-20 17:12:15 +03:00
44efe13ece
[maven-release-plugin] prepare release v.0.0.53 2023-03-20 17:12:15 +03:00
0cec0e651b
godfather ver 0.0.54 2023-03-20 17:11:45 +03:00
6f45154878
Упростил кнопки 2023-03-19 21:54:27 +03:00
30 changed files with 63 additions and 66 deletions

View File

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
@ -39,7 +38,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<godfather.core.ver>0.0.54-SNAPSHOT</godfather.core.ver> <godfather.core.ver>0.0.54</godfather.core.ver>
<!-- https://mvnrepository.com/artifact/org.telegram/telegrambots --> <!-- https://mvnrepository.com/artifact/org.telegram/telegrambots -->
<telegrambots.ver>6.3.0</telegrambots.ver> <telegrambots.ver>6.3.0</telegrambots.ver>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-consumer</artifactId> <artifactId>telegram-consumer</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-consumer</artifactId> <artifactId>telegram-consumer</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-consumer-main</artifactId> <artifactId>telegram-consumer-main</artifactId>

View File

@ -50,7 +50,7 @@ public final class MessageChatMailConvert {
final User fromUser = message.getFrom(); final User fromUser = message.getFrom();
mail.setFirstName(fromUser.getFirstName()); mail.setFirstName(fromUser.getFirstName());
mail.setLastName(fromUser.getLastName()); mail.setLastName(fromUser.getLastName());
mail.setPayload(MailPayload.USERNAME, fromUser.getUserName()); mail.addPayload(MailPayload.USERNAME, fromUser.getUserName());
mail.setFromPersonId(fromUser.getId().toString()); mail.setFromPersonId(fromUser.getId().toString());
convertDocument(message.getDocument()).ifPresent(mail::addAttachment); convertDocument(message.getDocument()).ifPresent(mail::addAttachment);

View File

@ -50,7 +50,7 @@ public final class MessageMailConvert {
final Chat chat = message.getChat(); final Chat chat = message.getChat();
mail.setFirstName(chat.getFirstName()); mail.setFirstName(chat.getFirstName());
mail.setLastName(chat.getLastName()); mail.setLastName(chat.getLastName());
mail.setPayload(MailPayload.USERNAME, chat.getUserName()); mail.addPayload(MailPayload.USERNAME, chat.getUserName());
convertDocument(message.getDocument()).ifPresent(mail::addAttachment); convertDocument(message.getDocument()).ifPresent(mail::addAttachment);
convertContact(message.getContact()).ifPresent(mail::addAttachment); convertContact(message.getContact()).ifPresent(mail::addAttachment);

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-consumer</artifactId> <artifactId>telegram-consumer</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-consumer-quarkus</artifactId> <artifactId>telegram-consumer-quarkus</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-consumer</artifactId> <artifactId>telegram-consumer</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-consumer-simple</artifactId> <artifactId>telegram-consumer-simple</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-context</artifactId> <artifactId>telegram-context</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-context</artifactId> <artifactId>telegram-context</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-context-main</artifactId> <artifactId>telegram-context-main</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-context</artifactId> <artifactId>telegram-context</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-context-quarkus</artifactId> <artifactId>telegram-context-quarkus</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>telegram-context</artifactId> <artifactId>telegram-context</artifactId>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-context-simple</artifactId> <artifactId>telegram-context-simple</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<modules> <modules>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-core</artifactId> <artifactId>telegram-core</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-core-main</artifactId> <artifactId>telegram-core-main</artifactId>

View File

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>telegram-core</artifactId> <artifactId>telegram-core</artifactId>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-core-quarkus</artifactId> <artifactId>telegram-core-quarkus</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-core</artifactId> <artifactId>telegram-core</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-core-simple</artifactId> <artifactId>telegram-core-simple</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-domain</artifactId> <artifactId>telegram-domain</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-domain</artifactId> <artifactId>telegram-domain</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-domain-main</artifactId> <artifactId>telegram-domain-main</artifactId>

View File

@ -3,12 +3,18 @@ package dev.struchkov.godfather.telegram.domain.keyboard;
import dev.struchkov.godfather.main.domain.keyboard.KeyBoard; import dev.struchkov.godfather.main.domain.keyboard.KeyBoard;
import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton; import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton;
import dev.struchkov.godfather.main.domain.keyboard.KeyBoardLine; import dev.struchkov.godfather.main.domain.keyboard.KeyBoardLine;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static dev.struchkov.godfather.main.domain.keyboard.simple.SimpleKeyBoardLine.simpleLine; import static dev.struchkov.godfather.main.domain.keyboard.simple.SimpleKeyBoardLine.simpleLine;
@Getter
@Setter
@NoArgsConstructor
public class InlineKeyBoard implements KeyBoard { public class InlineKeyBoard implements KeyBoard {
public static final String TYPE = "INLINE"; public static final String TYPE = "INLINE";
@ -39,15 +45,13 @@ public class InlineKeyBoard implements KeyBoard {
return builder().line(simpleLine(buttons)).build(); return builder().line(simpleLine(buttons)).build();
} }
public List<KeyBoardLine> getLines() { @Override
return lines;
}
public String getType() { public String getType() {
return TYPE; return TYPE;
} }
public static final class Builder { public static final class Builder {
private List<KeyBoardLine> lines = new ArrayList<>(); private List<KeyBoardLine> lines = new ArrayList<>();
private Builder() { private Builder() {
@ -66,6 +70,7 @@ public class InlineKeyBoard implements KeyBoard {
public InlineKeyBoard build() { public InlineKeyBoard build() {
return new InlineKeyBoard(this); return new InlineKeyBoard(this);
} }
} }
} }

View File

@ -1,6 +1,9 @@
package dev.struchkov.godfather.telegram.domain.keyboard.button; package dev.struchkov.godfather.telegram.domain.keyboard.button;
import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton; import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import static dev.struchkov.haiti.utils.Inspector.Utils.nullPointer; import static dev.struchkov.haiti.utils.Inspector.Utils.nullPointer;
import static dev.struchkov.haiti.utils.Inspector.isNotNull; import static dev.struchkov.haiti.utils.Inspector.isNotNull;
@ -8,11 +11,14 @@ import static dev.struchkov.haiti.utils.Inspector.isNotNull;
/** /**
* Запрашивает у пользователя его контактный номер. * Запрашивает у пользователя его контактный номер.
*/ */
@Getter
@Setter
@NoArgsConstructor
public class ContactButton implements KeyBoardButton { public class ContactButton implements KeyBoardButton {
public static final String TYPE = "CONTACT"; public static final String TYPE = "CONTACT";
private final String label; private String label;
private ContactButton(String label) { private ContactButton(String label) {
this.label = label; this.label = label;
@ -23,10 +29,6 @@ public class ContactButton implements KeyBoardButton {
return new ContactButton(label); return new ContactButton(label);
} }
public String getLabel() {
return label;
}
@Override @Override
public String getType() { public String getType() {
return TYPE; return TYPE;

View File

@ -1,15 +1,21 @@
package dev.struchkov.godfather.telegram.domain.keyboard.button; package dev.struchkov.godfather.telegram.domain.keyboard.button;
import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton; import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import static dev.struchkov.haiti.utils.Inspector.isNotNull; import static dev.struchkov.haiti.utils.Inspector.isNotNull;
@Getter
@Setter
@NoArgsConstructor
public class UrlButton implements KeyBoardButton { public class UrlButton implements KeyBoardButton {
public static final String TYPE = "URL"; public static final String TYPE = "URL";
private final String label; private String label;
private final String url; private String url;
public UrlButton(String label, String url) { public UrlButton(String label, String url) {
this.label = label; this.label = label;
@ -26,12 +32,4 @@ public class UrlButton implements KeyBoardButton {
return TYPE; return TYPE;
} }
public String getLabel() {
return label;
}
public String getUrl() {
return url;
}
} }

View File

@ -1,15 +1,21 @@
package dev.struchkov.godfather.telegram.domain.keyboard.button; package dev.struchkov.godfather.telegram.domain.keyboard.button;
import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton; import dev.struchkov.godfather.main.domain.keyboard.KeyBoardButton;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import static dev.struchkov.haiti.utils.Inspector.isNotNull; import static dev.struchkov.haiti.utils.Inspector.isNotNull;
@Getter
@Setter
@NoArgsConstructor
public class WebAppButton implements KeyBoardButton { public class WebAppButton implements KeyBoardButton {
public static final String TYPE = "WEB_APP"; public static final String TYPE = "WEB_APP";
private final String label; private String label;
private final String url; private String url;
private WebAppButton(String label, String url) { private WebAppButton(String label, String url) {
this.label = label; this.label = label;
@ -21,14 +27,6 @@ public class WebAppButton implements KeyBoardButton {
return new WebAppButton(label, url); return new WebAppButton(label, url);
} }
public String getUrl() {
return url;
}
public String getLabel() {
return label;
}
@Override @Override
public String getType() { public String getType() {
return TYPE; return TYPE;

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-domain</artifactId> <artifactId>telegram-domain</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-domain-quarkus</artifactId> <artifactId>telegram-domain-quarkus</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-domain</artifactId> <artifactId>telegram-domain</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-domain-simple</artifactId> <artifactId>telegram-domain-simple</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-sender</artifactId> <artifactId>telegram-sender</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-sender</artifactId> <artifactId>telegram-sender</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-sender-main</artifactId> <artifactId>telegram-sender-main</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-sender</artifactId> <artifactId>telegram-sender</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-sender-quarkus</artifactId> <artifactId>telegram-sender-quarkus</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-sender</artifactId> <artifactId>telegram-sender</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-sender-simple</artifactId> <artifactId>telegram-sender-simple</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-simple</artifactId> <artifactId>telegram-simple</artifactId>

View File

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-bot</artifactId> <artifactId>telegram-bot</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-webhook</artifactId> <artifactId>telegram-webhook</artifactId>

View File

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.godfather.telegram</groupId> <groupId>dev.struchkov.godfather.telegram</groupId>
<artifactId>telegram-webhook</artifactId> <artifactId>telegram-webhook</artifactId>
<version>0.0.53-SNAPSHOT</version> <version>0.0.54-SNAPSHOT</version>
</parent> </parent>
<artifactId>telegram-webhook-quarkus</artifactId> <artifactId>telegram-webhook-quarkus</artifactId>