diff --git a/src/main/java/it/auties/whatsapp/api/QrHandler.java b/src/main/java/it/auties/whatsapp/api/QrHandler.java index 1151fb67..87034ddc 100644 --- a/src/main/java/it/auties/whatsapp/api/QrHandler.java +++ b/src/main/java/it/auties/whatsapp/api/QrHandler.java @@ -45,6 +45,17 @@ static QrHandler toString(Consumer smallQrConsumer) { }; } + /** + * Transforms the qr code in a UTF-8 plain string and accepts a consumer for the latter + * + * @param smallQrConsumer the non-null consumer + */ + static QrHandler toPlainString(Consumer qrConsumer) { + return qr -> { + qrConsumer.accept(qr); + }; + } + /** * Utility method to create a matrix from a qr countryCode *