Add missing file name and get name from file for fallback
This commit is contained in:
parent
a74b588cba
commit
813d0953e9
@ -66,7 +66,7 @@ class TelegramProvider : MessageProvider, Loggable {
|
|||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
token = this._token,
|
token = this._token,
|
||||||
text = this._message?.getText() ?: "",
|
text = this._message?.getText() ?: "",
|
||||||
filename = _filename ?: Date().time.toString(),
|
filename = (_filename ?: _file?.name) ?: Date().time.toString(),
|
||||||
document = Files.readAllBytes(_file!!.toPath()),
|
document = Files.readAllBytes(_file!!.toPath()),
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user