Commit 19072791 authored by Christopher Davis's avatar Christopher Davis Committed by Daniel Garcia Moreno

Fixed formatted_body and url issue

parent 166d396c
......@@ -216,16 +216,18 @@ pub fn send_msg(bk: &Backend, msg: Message) -> Result<(), Error> {
let mut attrs = json!({
"body": msg.body.clone(),
"msgtype": msg.mtype.clone(),
"url": msg.url.clone(),
"formatted_body": msg.formatted_body.clone(),
"format": msg.format.clone(),
"msgtype": msg.mtype.clone()
});
if let Some(u) = msg.url {
attrs["url"] = json!(u);
}
if let (Some(f), Some(f_b)) = (msg.format, msg.formatted_body) {
attrs["formatted_body"] = json!(f);
attrs["format"] = json!(f_b);
}
let tx = bk.tx.clone();
query!("put", &url, &attrs,
move |_| {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment