diff --git a/src/main.rs b/src/main.rs index e42c291..712222b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,9 +4,7 @@ use std::env; use std::error::Error; use std::fmt::Display; use std::io::IsTerminal; -use std::os::linux::raw::stat; use std::time::Instant; - use cccron_lib::config_spec::{self, CfgField, CfgGroup, CfgSpec}; use cccron_lib::date; use cccron_lib::email::{self, Email, SimpleEmail}; diff --git a/src/matrix.rs b/src/matrix.rs index 3a782e8..be122ab 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -125,6 +125,7 @@ impl MatrixClient { if response.status().is_success() { Ok(response.json()?) } else { + // println!("These were the parameters: {}", params); Err(format!("Request failed: {}", response.status()).into()) } } @@ -228,11 +229,12 @@ impl MatrixClient { ) -> Result> { let formatted_text = Self::format_matrix_html(text.to_string())?; let content = HashMap::from([ + ("type", "m.room.message"), ("msgtype", "m.text"), ("body", text), ("format", "org.matrix.custom.html"), ("formatted_body", &formatted_text), - //("m.mentions", "{}"), + ("m.mentions", "{}"), ]); self.send_room_event(&room_id, "m.room.message", &content) } diff --git a/src/mediawiki.rs b/src/mediawiki.rs index 6305d43..43dba5c 100644 --- a/src/mediawiki.rs +++ b/src/mediawiki.rs @@ -1,6 +1,5 @@ use std::cell::OnceCell; use std::error::Error; -use std::f64::consts::E; use chrono::{Datelike, NaiveDate, Utc}; use colored::Colorize; @@ -302,7 +301,7 @@ impl Mediawiki { if let Some(info) = error.get("info") { if info == "The page you tried to create has been created already." { verboseln!( - "The page you tried to create has been created already. Continuing..." + "The page you tried to create has been created already. Continuing without modifying the site..." ) } else { println!(