Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mukel committed Jul 20, 2016
1 parent e119451 commit db6e5f3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -37,7 +37,7 @@ object SafeBot extends TelegramBot with Polling with Commands {
}

SafeBot.run()

```

## Webhooks vs Polling
Expand Down Expand Up @@ -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 = {
Expand Down
4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/info/mukel/telegrambot4s/Implicits.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package info.mukel.telegrambot4s

import scala.language.implicitConversions

/**
* Useful implicits to reduce boilerplate.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>

Expand Down

0 comments on commit db6e5f3

Please sign in to comment.