Fix serialization.

This commit is contained in:
Paul Makles
2020-04-13 16:29:48 +01:00
parent 577f25642e
commit 0f793f84a2
7 changed files with 83 additions and 31 deletions

View File

@@ -23,11 +23,7 @@ pub struct PubSubMessage {
data: Notification,
}
pub fn send_message(
users: Option<Vec<String>>,
guild: Option<String>,
data: Notification,
) -> bool {
pub fn send_message(users: Option<Vec<String>>, guild: Option<String>, data: Notification) -> bool {
let message = PubSubMessage {
id: Ulid::new().to_string(),
source: SOURCEID.get().unwrap().to_string(),
@@ -92,7 +88,7 @@ pub fn launch_subscriber() {
super::state::send_message(
message.user_recipients,
message.target_guild,
json!(message.data).to_string(),
message.data.serialize(),
);
}
} else {