mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Support uploading and downloading message attachments (#13)
This commit is contained in:
parent
504b520fe1
commit
b6f4b03c12
14 changed files with 684 additions and 247 deletions
10
src/tests.rs
10
src/tests.rs
|
@ -1,6 +1,5 @@
|
|||
use std::collections::{BTreeMap, HashMap};
|
||||
use std::path::PathBuf;
|
||||
use std::sync::mpsc::sync_channel;
|
||||
|
||||
use matrix_sdk::ruma::{
|
||||
event_id,
|
||||
|
@ -16,6 +15,7 @@ use matrix_sdk::ruma::{
|
|||
|
||||
use lazy_static::lazy_static;
|
||||
use modalkit::tui::style::Color;
|
||||
use tokio::sync::mpsc::unbounded_channel;
|
||||
use url::Url;
|
||||
|
||||
use crate::{
|
||||
|
@ -154,9 +154,11 @@ pub fn mock_settings() -> ApplicationSettings {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn mock_store() -> ProgramStore {
|
||||
let (tx, _) = sync_channel(5);
|
||||
let worker = Requester { tx };
|
||||
pub async fn mock_store() -> ProgramStore {
|
||||
let (tx, _) = unbounded_channel();
|
||||
let homeserver = Url::parse("https://localhost").unwrap();
|
||||
let client = matrix_sdk::Client::new(homeserver).await.unwrap();
|
||||
let worker = Requester { tx, client };
|
||||
|
||||
let mut store = ChatStore::new(worker, mock_settings());
|
||||
let room_id = TEST_ROOM1_ID.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue