Skip to content

Commit abfdaa9

Browse files
committed
Fix bug in merge
1 parent cfab1a7 commit abfdaa9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

native/test/src/tests/media_msg/download.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,12 @@ async fn room_msg_can_download_image() -> Result<()> {
8181
let value = diff
8282
.value()
8383
.expect("diff set action should have valid value");
84-
if match_media_msg(&value, mimetype, &jpg_name).is_some() {
85-
found = value.event_item().and_then(|t| t.event_id());
84+
if let Some(msg_content) = match_media_msg(&value, mimetype, &jpg_name) {
85+
let event_id = value
86+
.event_item()
87+
.and_then(|t| t.event_id())
88+
.expect("media msg should be timeline event item");
89+
found = Some((msg_content, event_id));
8690
}
8791
}
8892
"Reset" => {

0 commit comments

Comments
 (0)