Skip to content

keyboardButtonRequestUser & user_shared #1205

Closed Answered by svlobachev
svlobachev asked this question in Q&A
Discussion options

You must be logged in to vote
 The solution has been found.


 if (update.hasMessage() && update.getMessage().hasText()) {

        String massageText = update.getMessage().getText();
        long chatId = update.getMessage().getChatId();
        User user = update.getMessage().getFrom();

        if (massageText.equals("/start")) {
            startCommandReceived(chatId, update.getMessage().getChat().getFirstName());
        } 
        else {
            sendMessage(chatId, "Sorry, command was not recognized");
        }

    } 
    else if (update.hasMessage()){
        long chatId = update.getMessage().getChatId();
        sendMessage(chatId, "UserShared --> "+ update.getMessage().getUserShared());
        sendMes…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by svlobachev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant