Update ruma

master
Jonas Platte 2020-11-25 18:50:50 +01:00
parent 5ca66a6985
commit 27ecab8574
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
3 changed files with 6 additions and 18 deletions

View File

@ -38,12 +38,8 @@ impl EventEmitter for CommandBot {
}; };
if msg_body.contains("!party") { if msg_body.contains("!party") {
let content = AnyMessageEventContent::RoomMessage(MessageEventContent::Text( let content = AnyMessageEventContent::RoomMessage(MessageEventContent::text_plain(
TextMessageEventContent { "🎉🎊🥳 let's PARTY!! 🥳🎊🎉",
body: "🎉🎊🥳 let's PARTY!! 🥳🎊🎉".to_string(),
formatted: None,
relates_to: None,
},
)); ));
// we clone here to hold the lock for as little time as possible. // we clone here to hold the lock for as little time as possible.
let room_id = room.read().await.room_id.clone(); let room_id = room.read().await.room_id.clone();

View File

@ -1945,10 +1945,7 @@ mod test {
}, },
assign, assign,
directory::Filter, directory::Filter,
events::{ events::{room::message::MessageEventContent, AnyMessageEventContent},
room::message::{MessageEventContent, TextMessageEventContent},
AnyMessageEventContent,
},
identifiers::{event_id, room_id, user_id}, identifiers::{event_id, room_id, user_id},
thirdparty, thirdparty,
}; };
@ -2490,13 +2487,8 @@ mod test {
let room_id = room_id!("!testroom:example.org"); let room_id = room_id!("!testroom:example.org");
let content = AnyMessageEventContent::RoomMessage(MessageEventContent::Text( let content =
TextMessageEventContent { AnyMessageEventContent::RoomMessage(MessageEventContent::text_plain("Hello world"));
body: "Hello world".to_owned(),
relates_to: None,
formatted: None,
},
));
let txn_id = Uuid::new_v4(); let txn_id = Uuid::new_v4();
let response = client let response = client
.room_send(&room_id, content, Some(txn_id)) .room_send(&room_id, content, Some(txn_id))

View File

@ -21,7 +21,7 @@ js_int = "0.1.9"
[dependencies.ruma] [dependencies.ruma]
version = "0.0.1" version = "0.0.1"
git = "https://github.com/ruma/ruma" git = "https://github.com/ruma/ruma"
rev = "ee4280cea2f8d24c7f747fd57776fe72d50ce744" rev = "48d1c9747561686e1c5627405780f6de01ee17b1"
features = ["client-api", "unstable-pre-spec"] features = ["client-api", "unstable-pre-spec"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]