Add todos

This commit is contained in:
Mikhail 2024-05-31 00:25:35 +02:00
parent ba26e833e4
commit 0554f3635a
1 changed files with 2 additions and 0 deletions

View File

@ -867,9 +867,11 @@ async fn handle_incoming_message(
if user.enabled_capabilities.contains(Capabilities::ChatHistory) {
let channel_name = match chan.clone() {
Chan::Global(chan) => chan,
// TODO Respond with an error when a local channel is requested
Chan::Local(chan) => chan,
};
let room = core.get_room(&RoomId::try_from(channel_name.clone())?).await;
// TODO Handle non-existent room
if let Some(room) = room {
let room_id = &RoomId::try_from(channel_name.clone())?;
let messages = user_handle.get_room_message_history(room_id, limit).await?;