Skip to content
Snippets Groups Projects
Commit c3924b56 authored by Jakub Kubík's avatar Jakub Kubík Committed by Timo Kösters
Browse files

feat: if txn id exists in the db, skip the event

parent 39bc84d8
No related branches found
No related tags found
No related merge requests found
...@@ -20,17 +20,14 @@ pub async fn send_event_to_device_route( ...@@ -20,17 +20,14 @@ pub async fn send_event_to_device_route(
let sender_user = body.sender_user.as_ref().expect("user is authenticated"); let sender_user = body.sender_user.as_ref().expect("user is authenticated");
let sender_device = body.sender_device.as_deref(); let sender_device = body.sender_device.as_deref();
// TODO: uncomment when https://github.com/vector-im/element-android/issues/3589 is solved
// Check if this is a new transaction id // Check if this is a new transaction id
/*
if db if db
.transaction_ids .transaction_ids
.existing_txnid(sender_user, sender_device, &body.txn_id)? .existing_txnid(sender_user, sender_device, &body.txn_id)?
.is_some() .is_some()
{ {
return Ok(send_event_to_device::v3::Response.into()); return Ok(send_event_to_device::v3::Response {});
} }
*/
for (target_user_id, map) in &body.messages { for (target_user_id, map) in &body.messages {
for (target_device_id_maybe, event) in map { for (target_device_id_maybe, event) in map {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment