diff --git a/README.md b/README.md index 08c56cc0..68cfcd9e 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ I encourage users to report any bug or broken functionality, I'll do my best to ```scala resolvers += "jitpack" at "https://jitpack.io" - - libraryDependencies += "com.github.mukel" %% "telegrambot4s" % "v1.2.0" + + libraryDependencies += "com.github.mukel" %% "telegrambot4s" % "v1.2.1" ``` Make sure to specify scala version in your build file. You can also pull any branch or release from Jitpack, [check it out](https://jitpack.io/#mukel/telegrambot4s). @@ -37,7 +37,7 @@ object SafeBot extends TelegramBot with Polling with Commands { } SafeBot.run() - + ``` ## Webhooks vs Polling @@ -108,7 +108,7 @@ object WebhookBot extends TelegramBot with Webhook { def token = "TOKEN" def port = 8443 def webhookUrl = "https://ed88ff73.ngrok.io" - + def toL337(s: String) = s.map("aegiost".zip("4361057").toMap.withDefault(identity)) override def handleMessage(message: Message): Unit = { diff --git a/build.sbt b/build.sbt index 1e27c14e..be746cf7 100644 --- a/build.sbt +++ b/build.sbt @@ -1,11 +1,13 @@ name := "telegrambot4s" -version := "1.2.0-SNAPSHOT" +version := "1.2.1-SNAPSHOT" scalaVersion := "2.11.8" organization := "info.mukel" +scalacOptions ++= Seq("-feature", "-deprecation") + val akkaVersion = "2.4.8" libraryDependencies ++= Seq( diff --git a/src/main/scala/info/mukel/telegrambot4s/Implicits.scala b/src/main/scala/info/mukel/telegrambot4s/Implicits.scala index 36c78fb7..37721ec0 100644 --- a/src/main/scala/info/mukel/telegrambot4s/Implicits.scala +++ b/src/main/scala/info/mukel/telegrambot4s/Implicits.scala @@ -1,5 +1,7 @@ package info.mukel.telegrambot4s +import scala.language.implicitConversions + /** * Useful implicits to reduce boilerplate. */ diff --git a/src/main/scala/info/mukel/telegrambot4s/api/Marshalling.scala b/src/main/scala/info/mukel/telegrambot4s/api/Marshalling.scala index 1d6717e1..008db04c 100644 --- a/src/main/scala/info/mukel/telegrambot4s/api/Marshalling.scala +++ b/src/main/scala/info/mukel/telegrambot4s/api/Marshalling.scala @@ -70,7 +70,7 @@ object Marshalling { // Handle files case _: InputFile => value match { case InputFile.FromFile(file) => - Multipart.FormData.BodyPart.fromFile(key, MediaTypes.`application/octet-stream`, file) + Multipart.FormData.BodyPart.fromPath(key, MediaTypes.`application/octet-stream`, file.toPath) case InputFile.FromSource(filename, contentLength, source) =>