Skip to content

Instantly share code, notes, and snippets.

@terjokhin
Created April 3, 2020 07:14
Show Gist options
  • Save terjokhin/80bff51c6021f1ee9b81922452ecc5e7 to your computer and use it in GitHub Desktop.
Save terjokhin/80bff51c6021f1ee9b81922452ecc5e7 to your computer and use it in GitHub Desktop.
private def buildTelegramClient[F[_]: Execute: ConcurrentEffect](isProd: Boolean, token: String): Resource[F, TelegramClient[F]] =
buildHttp4sClient.map { httpsClient =>
TelegramClient.fromHttp4sClient[F](token)(
if (isProd) httpsClient
else ResponseLogger(true, true)(httpsClient)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment