Fix attachment decoding
This commit is contained in:
parent
ca13fd4fa7
commit
9db0fa2513
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "reminder_web"
|
name = "reminder_web"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
authors = ["jellywx <judesouthworth@pm.me>"]
|
authors = ["jellywx <judesouthworth@pm.me>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
@ -468,8 +468,6 @@ pub(crate) async fn create_reminder(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// base64 decode error dropped here
|
|
||||||
let attachment_data = reminder.attachment.as_ref().map(|s| base64::decode(s).ok()).flatten();
|
|
||||||
let name = if reminder.name.is_empty() { name_default() } else { reminder.name.clone() };
|
let name = if reminder.name.is_empty() { name_default() } else { reminder.name.clone() };
|
||||||
let username = if reminder.username.as_ref().map(|s| s.is_empty()).unwrap_or(true) {
|
let username = if reminder.username.as_ref().map(|s| s.is_empty()).unwrap_or(true) {
|
||||||
None
|
None
|
||||||
@ -510,7 +508,7 @@ pub(crate) async fn create_reminder(
|
|||||||
`utc_time`
|
`utc_time`
|
||||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
|
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
|
||||||
new_uid,
|
new_uid,
|
||||||
attachment_data,
|
reminder.attachment,
|
||||||
reminder.attachment_name,
|
reminder.attachment_name,
|
||||||
channel,
|
channel,
|
||||||
reminder.avatar,
|
reminder.avatar,
|
||||||
|
Loading…
Reference in New Issue
Block a user