Add missing file name and get name from file for fallback

This commit is contained in:
Sambo Chea 2021-05-21 10:09:36 +07:00
parent a74b588cba
commit 813d0953e9

View File

@ -66,7 +66,7 @@ class TelegramProvider : MessageProvider, Loggable {
chatId = chatId,
token = this._token,
text = this._message?.getText() ?: "",
filename = _filename ?: Date().time.toString(),
filename = (_filename ?: _file?.name) ?: Date().time.toString(),
document = Files.readAllBytes(_file!!.toPath()),
)
} else {