Upgrade mxlink to fix missing messages in threads

Reported here https://github.com/etkecc/baibot/issues/13#issuecomment-2365273996

Fixed in 88fabb308c
This commit is contained in:
Slavi Pantaleev
2024-09-22 09:34:10 +03:00
parent 941e5f0bc4
commit d4ddd29660
3 changed files with 8 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ use mxlink::matrix_sdk::{
},
Room,
};
use mxlink::{MatrixLink, ThreadInfo};
use mxlink::{MatrixLink, ThreadGetMessagesParams, ThreadInfo};
use super::{MatrixMessage, MatrixMessageProcessingParams, MatrixMessageType, RoomEventFetcher};
use crate::entity::{MessagePayload, ThreadContext, ThreadContextFirstMessage};
@@ -23,7 +23,10 @@ pub async fn get_matrix_messages_in_thread(
room: &Room,
thread_id: OwnedEventId,
) -> Result<Vec<MatrixMessage>, mxlink::matrix_sdk::Error> {
let messages_native = matrix_link.threads().get_messages(room, thread_id).await?;
let messages_native = matrix_link
.threads()
.get_messages(room, thread_id, ThreadGetMessagesParams::default())
.await?;
let mut messages: Vec<MatrixMessage> = Vec::new();