forked from lavina/lavina
Remove excessive db call
This commit is contained in:
parent
ae0464b742
commit
dfc28148e5
|
@ -871,8 +871,8 @@ async fn handle_incoming_message(
|
||||||
};
|
};
|
||||||
let room = core.get_room(&RoomId::try_from(channel_name.clone())?).await;
|
let room = core.get_room(&RoomId::try_from(channel_name.clone())?).await;
|
||||||
if let Some(room) = room {
|
if let Some(room) = room {
|
||||||
let room_info = room.get_room_info().await;
|
let room_id = &RoomId::try_from(channel_name.clone())?;
|
||||||
let messages = user_handle.get_room_message_history(&room_info.id, limit).await?;
|
let messages = user_handle.get_room_message_history(room_id, limit).await?;
|
||||||
for message in messages {
|
for message in messages {
|
||||||
let mut tags = vec![];
|
let mut tags = vec![];
|
||||||
if user.enabled_capabilities.contains(Capabilities::ServerTime) {
|
if user.enabled_capabilities.contains(Capabilities::ServerTime) {
|
||||||
|
|
Loading…
Reference in New Issue