From 8d6fe31430aa1d83262915f5532c21beb8391f31 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Fri, 28 Jan 2022 20:41:57 +0800 Subject: [PATCH] fix upload message isEmpty --- src/main/java/com/yutou/qqbot/Controllers/AppController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/yutou/qqbot/Controllers/AppController.java b/src/main/java/com/yutou/qqbot/Controllers/AppController.java index 5cc3c58..ed07c24 100644 --- a/src/main/java/com/yutou/qqbot/Controllers/AppController.java +++ b/src/main/java/com/yutou/qqbot/Controllers/AppController.java @@ -61,6 +61,9 @@ public class AppController { public String sendQQ(@RequestBody JSONObject json) { File image = null; String ret; + if(json.getString("message").isEmpty()){ + return "not message"; + } if (json.containsKey("image")) { image = HttpTools.syncDownload(json.getString("image"), System.currentTimeMillis() + ".png"); }