matrix-sdk-test: Add response for members API

master
Julian Sparber 2021-03-12 14:11:46 +01:00
parent a4bac499e9
commit 450036cf86
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,25 @@
use lazy_static::lazy_static;
use serde_json::{json, Value as JsonValue};
lazy_static! {
pub static ref MEMBERS: JsonValue = json!({
"chunk": [
{
"content": {
"avatar_url": null,
"displayname": "example",
"membership": "join"
},
"event_id": "$151800140517rfvjc:localhost",
"membership": "join",
"origin_server_ts": 151800140,
"sender": "@example:localhost",
"state_key": "@example:localhost",
"type": "m.room.member",
"unsigned": {
"age": 2970366,
}
}
]
});
}

View File

@ -8,6 +8,7 @@ use lazy_static::lazy_static;
use serde_json::{json, Value as JsonValue};
pub mod events;
pub mod members;
pub mod sync;
pub use events::{
@ -20,6 +21,8 @@ pub use sync::{
DEFAULT_SYNC_SUMMARY, INVITE_SYNC, LEAVE_SYNC, LEAVE_SYNC_EVENT, MORE_SYNC, SYNC, VOIP_SYNC,
};
pub use members::MEMBERS;
lazy_static! {
pub static ref DEVICES: JsonValue = json!({
"devices": [