mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 20:06:29 +01:00
AI: prevent empty text
This commit is contained in:
@@ -43,8 +43,8 @@ public class AI {
|
||||
}
|
||||
|
||||
static String completeChat(Context context, long id, CharSequence body) throws JSONException, IOException {
|
||||
if (body == null || body.length() == 0)
|
||||
return null;
|
||||
if (body == null || TextUtils.isEmpty(body.toString().trim()))
|
||||
body = "?";
|
||||
|
||||
if (OpenAI.isAvailable(context)) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
Reference in New Issue
Block a user