mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
Add PduId wrapper struct
Death to Vec<u8>
This commit is contained in:
parent
341f4213d0
commit
26322d5a95
15 changed files with 110 additions and 71 deletions
|
|
@ -1372,7 +1372,7 @@ pub(crate) async fn invite_helper(
|
|||
)
|
||||
})?;
|
||||
|
||||
let pdu_id: Vec<u8> = services()
|
||||
let pdu_id = services()
|
||||
.rooms
|
||||
.event_handler
|
||||
.handle_incoming_pdu(
|
||||
|
|
|
|||
|
|
@ -84,7 +84,9 @@ pub(crate) async fn search_events_route(
|
|||
if let Some(s) = searches
|
||||
.iter_mut()
|
||||
.map(|s| (s.peek().cloned(), s))
|
||||
.max_by_key(|(peek, _)| peek.clone())
|
||||
.max_by_key(|(peek, _)| {
|
||||
peek.as_ref().map(|id| id.as_bytes().to_vec())
|
||||
})
|
||||
.and_then(|(_, i)| i.next())
|
||||
{
|
||||
results.push(s);
|
||||
|
|
|
|||
|
|
@ -1622,7 +1622,7 @@ async fn create_join_event(
|
|||
.roomid_mutex_federation
|
||||
.lock_key(room_id.to_owned())
|
||||
.await;
|
||||
let pdu_id: Vec<u8> = services()
|
||||
let pdu_id = services()
|
||||
.rooms
|
||||
.event_handler
|
||||
.handle_incoming_pdu(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue