fix: default to empty vec if meta field not present (#59)

This commit is contained in:
Petko Pavlovski 2023-05-12 14:58:47 +03:00 committed by GitHub
parent 6a2d449d7d
commit 98144f762f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,7 @@ pub struct WakuMessage {
version: WakuMessageVersion,
/// Unix timestamp in nanoseconds
timestamp: usize,
#[serde(with = "base64_serde")]
#[serde(with = "base64_serde", default = "Vec::new")]
meta: Vec<u8>,
ephemeral: bool,
// TODO: implement RLN fields