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