smokestack/main: format time
This commit is contained in:
parent
f6ae6b42a2
commit
dc7d208a8d
|
@ -80,8 +80,15 @@ fn language_colour(language: &str) -> Colour {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn format_message(post: Post) -> Option<String> {
|
fn format_message(post: Post) -> Option<String> {
|
||||||
|
let time_str;
|
||||||
|
let time = if let Some(time) = post.timestamp() {
|
||||||
|
time_str = format!("{}", time.format("%H:%M:%S"));
|
||||||
|
&time_str
|
||||||
|
} else {
|
||||||
|
&post.created_at
|
||||||
|
};
|
||||||
|
|
||||||
let language = &post.language?;
|
let language = &post.language?;
|
||||||
let time = &post.created_at;
|
|
||||||
let display_name = &post.account.display_name;
|
let display_name = &post.account.display_name;
|
||||||
let username = &post.account.username;
|
let username = &post.account.username;
|
||||||
let host = post.account.host()?;
|
let host = post.account.host()?;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user