Merge pull request #244 from rubenlagus/dev

Dev
This commit is contained in:
Ruben Bermudez 2017-05-29 00:44:44 +02:00 committed by GitHub
commit 41ee5fd38f
9 changed files with 25 additions and 14 deletions

View File

@ -27,16 +27,16 @@ Just import add the library to your project with one of these options:
<dependency>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>3.0</version>
<version>3.0.1</version>
</dependency>
```
```gradle
compile "org.telegram:telegrambots:3.0"
compile "org.telegram:telegrambots:3.0.1"
```
2. Using Jitpack from [here](https://jitpack.io/#rubenlagus/TelegramBots/3.0)
3. Download the jar(including all dependencies) from [here](https://github.com/rubenlagus/TelegramBots/releases/tag/3.0)
2. Using Jitpack from [here](https://jitpack.io/#rubenlagus/TelegramBots/3.0.1)
3. Download the jar(including all dependencies) from [here](https://github.com/rubenlagus/TelegramBots/releases/tag/3.0.1)
In order to use Long Polling mode, just create your own bot extending `org.telegram.telegrambots.bots.TelegramLongPollingBot`.

View File

@ -54,3 +54,8 @@
7. New Video Messages API methods
**[[How to update to version 3.0|How-To-Update#3.0]]**
### <a id="3.0.1"></a>3.0.1 ###
1. Added `getLevel` to `BotLogger` class.
2. Fix wrong URL when setting webhook
3. Bug Fixing: #244, #233

View File

@ -11,13 +11,13 @@ First you need ot get the library and add it to your project. There are few poss
<dependency>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>3.0</version>
<version>3.0.1</version>
</dependency>
```
* With **Gradle**:
```groovy
compile group: 'org.telegram', name: 'telegrambots', version: '3.0'
compile group: 'org.telegram', name: 'telegrambots', version: '3.0.1'
```
2. Don't like **Maven Central Repository**? It can also be taken from [Jitpack](https://jitpack.io/#rubenlagus/TelegramBots).

View File

@ -7,7 +7,7 @@
<groupId>org.telegram</groupId>
<artifactId>Bots</artifactId>
<packaging>pom</packaging>
<version>3.0</version>
<version>3.0.1</version>
<modules>
<module>telegrambots</module>
@ -24,6 +24,6 @@
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<bots.version>3.0</bots.version>
<bots.version>3.0.1</bots.version>
</properties>
</project>

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.telegram</groupId>
<artifactId>telegrambots-meta</artifactId>
<version>3.0</version>
<version>3.0.1</version>
<packaging>jar</packaging>
<name>Telegram Bots Meta</name>

View File

@ -192,7 +192,9 @@ public class Message implements BotApiObject {
}
public List<MessageEntity> getEntities() {
entities.forEach(x -> x.computeText(text));
if (entities != null) {
entities.forEach(x -> x.computeText(text));
}
return entities;
}

View File

@ -17,6 +17,10 @@ public class BotLogger {
logger.setLevel(level);
}
public static Level getLevel() {
return logger.getLevel();
}
public static void registerLogger(Handler handler) {
logger.addHandler(handler);
}

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>3.0</version>
<version>3.0.1</version>
<packaging>jar</packaging>
<name>Telegram Bots</name>
@ -66,7 +66,7 @@
<jackson.version>2.8.7</jackson.version>
<jacksonanotation.version>2.8.0</jacksonanotation.version>
<commonio.version>2.5</commonio.version>
<bots.version>3.0</bots.version>
<bots.version>3.0.1</bots.version>
</properties>
<dependencyManagement>

View File

@ -45,7 +45,7 @@ public abstract class TelegramWebhookBot extends DefaultAbsSender implements Web
@Override
public void setWebhook(String url, String publicCertificatePath) throws TelegramApiRequestException {
try (CloseableHttpClient httpclient = HttpClientBuilder.create().setSSLHostnameVerifier(new NoopHostnameVerifier()).build()) {
String requestUrl = getBaseUrl() + getBotToken() + "/" + SetWebhook.PATH;
String requestUrl = getBaseUrl() + SetWebhook.PATH;
HttpPost httppost = new HttpPost(requestUrl);
httppost.setConfig(botOptions.getRequestConfig());