Skip to content

Commit

Permalink
update ruwuma
Browse files Browse the repository at this point in the history
  • Loading branch information
JadedBlueEyes committed Dec 19, 2024
1 parent f54a62d commit e82c6c8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ version = "0.1.2"
[workspace.dependencies.ruma]
git = "https://github.com/girlbossceo/ruwuma"
#branch = "conduwuit-changes"
rev = "a204cb56dbc20f72a1cbd0e9d6c827bbfd4082f2"
rev = "112ccc24cb14de26757715d611285d0806d5d91f"
features = [
"compat",
"rand",
Expand All @@ -350,7 +350,6 @@ features = [
"compat-upload-signatures",
"identifiers-validation",
"unstable-unspecified",
"unstable-msc2409",
"unstable-msc2448",
"unstable-msc2666",
"unstable-msc2867",
Expand All @@ -366,6 +365,7 @@ features = [
"unstable-msc4121",
"unstable-msc4125",
"unstable-msc4186",
"unstable-msc4203", # sending to-device events to appservices
"unstable-msc4210", # remove legacy mentions
"unstable-extensible-events",
]
Expand Down
14 changes: 5 additions & 9 deletions src/service/sending/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use futures::{
};
use ruma::{
api::{
appservice::event::push_events::v1::Edu as RumaEdu,
appservice::event::push_events::v1::EphemeralData,
federation::transactions::{
edu::{
DeviceListUpdateContent, Edu, PresenceContent, PresenceUpdate, ReceiptContent,
Expand Down Expand Up @@ -587,7 +587,7 @@ impl Service {
.filter(|event| matches!(event, SendingEvent::Pdu(_)))
.count(),
);
let mut edu_jsons: Vec<RumaEdu> = Vec::with_capacity(
let mut edu_jsons: Vec<EphemeralData> = Vec::with_capacity(
events
.iter()
.filter(|event| matches!(event, SendingEvent::Edu(_)))
Expand All @@ -600,16 +600,12 @@ impl Service {
pdu_jsons.push(pdu.to_room_event());
}
},
| SendingEvent::Edu(edu) => {
if appservice
.receive_ephemeral
.is_some_and(|receive_edus| receive_edus)
{
| SendingEvent::Edu(edu) =>
if appservice.receive_ephemeral {
if let Ok(edu) = serde_json::from_slice(edu) {
edu_jsons.push(edu);
}
}
},
},
| SendingEvent::Flush => {}, // flush only; no new content
}
}
Expand Down

0 comments on commit e82c6c8

Please sign in to comment.