Compare commits
4 Commits
77f2c67540
...
fd7c53060a
Author | SHA1 | Date | |
---|---|---|---|
fd7c53060a | |||
44efe13ece | |||
0cec0e651b | |||
6f45154878 |
7
pom.xml
7
pom.xml
@ -1,11 +1,10 @@
|
||||
<?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"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-bot</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
@ -39,7 +38,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<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 -->
|
||||
<telegrambots.ver>6.3.0</telegrambots.ver>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>telegram-bot</artifactId>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-consumer</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-consumer</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-consumer-main</artifactId>
|
||||
|
@ -50,7 +50,7 @@ public final class MessageChatMailConvert {
|
||||
final User fromUser = message.getFrom();
|
||||
mail.setFirstName(fromUser.getFirstName());
|
||||
mail.setLastName(fromUser.getLastName());
|
||||
mail.setPayload(MailPayload.USERNAME, fromUser.getUserName());
|
||||
mail.addPayload(MailPayload.USERNAME, fromUser.getUserName());
|
||||
mail.setFromPersonId(fromUser.getId().toString());
|
||||
|
||||
convertDocument(message.getDocument()).ifPresent(mail::addAttachment);
|
||||
|
@ -50,7 +50,7 @@ public final class MessageMailConvert {
|
||||
final Chat chat = message.getChat();
|
||||
mail.setFirstName(chat.getFirstName());
|
||||
mail.setLastName(chat.getLastName());
|
||||
mail.setPayload(MailPayload.USERNAME, chat.getUserName());
|
||||
mail.addPayload(MailPayload.USERNAME, chat.getUserName());
|
||||
|
||||
convertDocument(message.getDocument()).ifPresent(mail::addAttachment);
|
||||
convertContact(message.getContact()).ifPresent(mail::addAttachment);
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-consumer</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-consumer-quarkus</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-consumer</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-consumer-simple</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>telegram-bot</artifactId>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-context</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-context</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-context-main</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-context</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-context-quarkus</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>telegram-context</artifactId>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-context-simple</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-bot</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-core</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-core-main</artifactId>
|
||||
|
@ -1,11 +1,10 @@
|
||||
<?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"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>telegram-core</artifactId>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-core-quarkus</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-core</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-core-simple</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-bot</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-domain</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-domain</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-domain-main</artifactId>
|
||||
|
@ -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.KeyBoardButton;
|
||||
import dev.struchkov.godfather.main.domain.keyboard.KeyBoardLine;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static dev.struchkov.godfather.main.domain.keyboard.simple.SimpleKeyBoardLine.simpleLine;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class InlineKeyBoard implements KeyBoard {
|
||||
|
||||
public static final String TYPE = "INLINE";
|
||||
@ -39,15 +45,13 @@ public class InlineKeyBoard implements KeyBoard {
|
||||
return builder().line(simpleLine(buttons)).build();
|
||||
}
|
||||
|
||||
public List<KeyBoardLine> getLines() {
|
||||
return lines;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public static final class Builder {
|
||||
|
||||
private List<KeyBoardLine> lines = new ArrayList<>();
|
||||
|
||||
private Builder() {
|
||||
@ -66,6 +70,7 @@ public class InlineKeyBoard implements KeyBoard {
|
||||
public InlineKeyBoard build() {
|
||||
return new InlineKeyBoard(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
package dev.struchkov.godfather.telegram.domain.keyboard.button;
|
||||
|
||||
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.isNotNull;
|
||||
@ -8,11 +11,14 @@ import static dev.struchkov.haiti.utils.Inspector.isNotNull;
|
||||
/**
|
||||
* Запрашивает у пользователя его контактный номер.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class ContactButton implements KeyBoardButton {
|
||||
|
||||
public static final String TYPE = "CONTACT";
|
||||
|
||||
private final String label;
|
||||
private String label;
|
||||
|
||||
private ContactButton(String label) {
|
||||
this.label = label;
|
||||
@ -23,10 +29,6 @@ public class ContactButton implements KeyBoardButton {
|
||||
return new ContactButton(label);
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return TYPE;
|
||||
|
@ -1,15 +1,21 @@
|
||||
package dev.struchkov.godfather.telegram.domain.keyboard.button;
|
||||
|
||||
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;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class UrlButton implements KeyBoardButton {
|
||||
|
||||
public static final String TYPE = "URL";
|
||||
|
||||
private final String label;
|
||||
private final String url;
|
||||
private String label;
|
||||
private String url;
|
||||
|
||||
public UrlButton(String label, String url) {
|
||||
this.label = label;
|
||||
@ -26,12 +32,4 @@ public class UrlButton implements KeyBoardButton {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,15 +1,21 @@
|
||||
package dev.struchkov.godfather.telegram.domain.keyboard.button;
|
||||
|
||||
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;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class WebAppButton implements KeyBoardButton {
|
||||
|
||||
public static final String TYPE = "WEB_APP";
|
||||
|
||||
private final String label;
|
||||
private final String url;
|
||||
private String label;
|
||||
private String url;
|
||||
|
||||
private WebAppButton(String label, String url) {
|
||||
this.label = label;
|
||||
@ -21,14 +27,6 @@ public class WebAppButton implements KeyBoardButton {
|
||||
return new WebAppButton(label, url);
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return TYPE;
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-domain</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-domain-quarkus</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-domain</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-domain-simple</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-bot</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-sender</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-sender</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-sender-main</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-sender</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-sender-quarkus</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-sender</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-sender-simple</artifactId>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-bot</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-simple</artifactId>
|
||||
|
@ -1,12 +1,10 @@
|
||||
<?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"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-bot</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-webhook</artifactId>
|
||||
|
@ -1,12 +1,10 @@
|
||||
<?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"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>dev.struchkov.godfather.telegram</groupId>
|
||||
<artifactId>telegram-webhook</artifactId>
|
||||
<version>0.0.53-SNAPSHOT</version>
|
||||
<version>0.0.54-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>telegram-webhook-quarkus</artifactId>
|
||||
|
Loading…
Reference in New Issue
Block a user