mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-03 01:17:41 +08:00
修复:兼容旧版本保存的telegram配置
This commit is contained in:
parent
bfdc0e4fce
commit
35a8677c9d
@ -1,5 +1,7 @@
|
||||
package com.idormy.sms.forwarder.model.vo;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.idormy.sms.forwarder.R;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -44,7 +46,7 @@ public class TelegramSettingVo implements Serializable {
|
||||
this.proxyAuthenticator = proxyAuthenticator;
|
||||
this.proxyUsername = proxyUsername;
|
||||
this.proxyPassword = proxyPassword;
|
||||
this.method = method;
|
||||
this.method = TextUtils.isEmpty(method) ? "POST" : method;
|
||||
}
|
||||
|
||||
public int getProxyTypeCheckId() {
|
||||
|
@ -88,7 +88,7 @@ public class SenderTelegramMsg extends SenderBaseMsg {
|
||||
.build();
|
||||
|
||||
final Request request;
|
||||
if (method.equals("GET")) {
|
||||
if (method != null && method.equals("GET")) {
|
||||
request = new Request.Builder()
|
||||
.url(requestUrl + "?chat_id=" + chatId + "&text=" + URLEncoder.encode(finalText, "UTF-8"))
|
||||
.build();
|
||||
|
Loading…
x
Reference in New Issue
Block a user