Рефакторинг
This commit is contained in:
parent
e2ed76abbe
commit
2f33c2ac2c
@ -37,9 +37,9 @@ public class BoardCommentSenderVk implements Sent {
|
||||
public void send(Integer contentId, Integer personId, BoxAnswer boxAnswer) {
|
||||
try {
|
||||
StringBuilder insertAnswer = new StringBuilder(vkInsertData.insertWords(boxAnswer.getMessage(), personId));
|
||||
if (boxAnswer.getKeyboard() != null) {
|
||||
if (boxAnswer.getKeyBoard() != null) {
|
||||
insertAnswer.append("\n\nМеню:\n");
|
||||
for (KeyBoardLine keyBoardLine : boxAnswer.getKeyboard().getKeyBoardLines()) {
|
||||
for (KeyBoardLine keyBoardLine : boxAnswer.getKeyBoard().getKeyBoardLines()) {
|
||||
for (KeyBoardButton keyBoardButton : keyBoardLine.getKeyBoardButtons()) {
|
||||
switch (keyBoardButton.getType()) {
|
||||
case TEXT:
|
||||
|
@ -43,7 +43,7 @@ public class MailSenderVk implements Sent {
|
||||
MessagesSendQuery messages = vkApiClient.messages().send(groupActor).peerId(peerId)
|
||||
.message(vkInsertData.insertWords(boxAnswer.getMessage(), peerId))
|
||||
.randomId(ThreadLocalRandom.current().nextInt(0, Integer.MAX_VALUE));
|
||||
messages.keyboard(convertKeyBoard(boxAnswer.getKeyboard()));
|
||||
messages.keyboard(convertKeyBoard(boxAnswer.getKeyBoard()));
|
||||
|
||||
if (boxAnswer.getCoordinates() != null) {
|
||||
messages.lat(boxAnswer.getCoordinates().getLatitude()).lng(boxAnswer.getCoordinates().getLongitude());
|
||||
|
Reference in New Issue
Block a user