Skip to content

Commit

Permalink
fix: telegram api translator log error
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed May 6, 2024
1 parent a950991 commit 6fa3c68
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ object TelegramAPITranslator : Translator {
if (res is TL_messages_translateResult && res.result.isNotEmpty()) {
it.resume(res.result[0].text)
} else {
FileLog.e(err?.text)
if (err?.text != null && err.text!!.isNotEmpty()) {
FileLog.e(err.text)
}
it.resumeWithException(RuntimeException("Failed to translate by Telegram API"))
}
}
Expand Down

0 comments on commit 6fa3c68

Please sign in to comment.