Skip to content

Commit db6e5f3

Browse files
committed
Fix deprecation warnings
1 parent e119451 commit db6e5f3

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ I encourage users to report any bug or broken functionality, I'll do my best to
1616

1717
```scala
1818
resolvers += "jitpack" at "https://jitpack.io"
19-
20-
libraryDependencies += "com.github.mukel" %% "telegrambot4s" % "v1.2.0"
19+
20+
libraryDependencies += "com.github.mukel" %% "telegrambot4s" % "v1.2.1"
2121
```
2222
Make sure to specify scala version in your build file.
2323
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 {
3737
}
3838

3939
SafeBot.run()
40-
40+
4141
```
4242

4343
## Webhooks vs Polling
@@ -108,7 +108,7 @@ object WebhookBot extends TelegramBot with Webhook {
108108
def token = "TOKEN"
109109
def port = 8443
110110
def webhookUrl = "https://ed88ff73.ngrok.io"
111-
111+
112112
def toL337(s: String) = s.map("aegiost".zip("4361057").toMap.withDefault(identity))
113113

114114
override def handleMessage(message: Message): Unit = {

build.sbt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
name := "telegrambot4s"
22

3-
version := "1.2.0-SNAPSHOT"
3+
version := "1.2.1-SNAPSHOT"
44

55
scalaVersion := "2.11.8"
66

77
organization := "info.mukel"
88

9+
scalacOptions ++= Seq("-feature", "-deprecation")
10+
911
val akkaVersion = "2.4.8"
1012

1113
libraryDependencies ++= Seq(

src/main/scala/info/mukel/telegrambot4s/Implicits.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package info.mukel.telegrambot4s
22

3+
import scala.language.implicitConversions
4+
35
/**
46
* Useful implicits to reduce boilerplate.
57
*/

src/main/scala/info/mukel/telegrambot4s/api/Marshalling.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ object Marshalling {
7070
// Handle files
7171
case _: InputFile => value match {
7272
case InputFile.FromFile(file) =>
73-
Multipart.FormData.BodyPart.fromFile(key, MediaTypes.`application/octet-stream`, file)
73+
Multipart.FormData.BodyPart.fromPath(key, MediaTypes.`application/octet-stream`, file.toPath)
7474

7575
case InputFile.FromSource(filename, contentLength, source) =>
7676

0 commit comments

Comments
 (0)