SAM conversion (<https://kotlinlang.org/docs/refer...
# getting-started
h
SAM conversion (https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions) should work in Kotlin, too. I think the problem might be the return type. Can you try and specify the type explicitly, like
Copy code
return Reply.of(Consumer<Update> { update -> silent.send("Nice pic!", getChatId(update)!!) }, Flag.PHOTO)
?