Skip to content

Commit

Permalink
Merge pull request #407 from BasselAshi/plain-qr-tostring
Browse files Browse the repository at this point in the history
Implement plain string in QrHandler
  • Loading branch information
Auties00 authored Oct 23, 2023
2 parents 8836121 + 6ea55d5 commit abfa6bf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/it/auties/whatsapp/api/QrHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ static QrHandler toString(Consumer<String> smallQrConsumer) {
};
}

/**
* Transforms the qr code in a UTF-8 plain string and accepts a consumer for the latter
*
* @param qrConsumer the non-null consumer
*/
static QrHandler toPlainString(Consumer<String> qrConsumer) {
return qr -> {
qrConsumer.accept(qr);
};
}

/**
* Utility method to create a matrix from a qr countryCode
*
Expand Down

0 comments on commit abfa6bf

Please sign in to comment.