Clean up obsolete / fulfilled TODO items
parent
77c789b39e
commit
bd5669d3e4
|
@ -16,8 +16,6 @@ impl From<&Message> for MessageReference {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Some way to emit messages for matrix,
|
||||
// and some way to receive messages from matrix.
|
||||
struct DiscordHandler {
|
||||
ctx_tx: mpsc::UnboundedSender<Context>,
|
||||
message_tx: mpsc::UnboundedSender<SentMessage>,
|
||||
|
@ -38,7 +36,6 @@ impl EventHandler for DiscordHandler {
|
|||
}
|
||||
|
||||
let message_ref = MessageReference::from(&message);
|
||||
// TODO: Store this message ref & associations in the DB
|
||||
|
||||
let content = discord_message_format::parse(&message.content);
|
||||
let content = message_ast::convert_discord(&content);
|
||||
|
|
|
@ -93,7 +93,6 @@ impl EventHandler for MatrixHandler {
|
|||
.filter(|f| f.format == MessageFormat::Html)
|
||||
.map(|f| &f.body)
|
||||
{
|
||||
// TODO: Parse html_body into MessageContent AST
|
||||
convert_matrix(html)
|
||||
} else {
|
||||
convert_plain(&text.body)
|
||||
|
@ -113,10 +112,7 @@ impl EventHandler for MatrixHandler {
|
|||
}
|
||||
}
|
||||
|
||||
MessageType::Emote(_emote) => {
|
||||
// TODO
|
||||
}
|
||||
|
||||
// TODO: Handle reactions, uploads (audio, video, image, file), and any other types of event
|
||||
_ => {}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -45,10 +45,8 @@ pub fn convert_matrix(message: &str) -> MessageContent {
|
|||
}
|
||||
}
|
||||
|
||||
NodeEdge::End(node) => {
|
||||
match node.data() {
|
||||
NodeEdge::End(node) => match node.data() {
|
||||
NodeData::Text(text) => {
|
||||
// TODO: Does this need to get HTML-decoded or something
|
||||
components.push(MessageComponent::Plain(text.borrow().clone()));
|
||||
}
|
||||
NodeData::Element(element) => {
|
||||
|
@ -112,8 +110,7 @@ pub fn convert_matrix(message: &str) -> MessageContent {
|
|||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue