Clean up (mostly automated with cargo clippy --fix)
This commit is contained in:
parent
979ec6b4fa
commit
d68c93b5fa
36 changed files with 364 additions and 393 deletions
|
@ -37,7 +37,7 @@ pub async fn set_read_marker_route(
|
|||
};
|
||||
db.account_data.update(
|
||||
Some(&body.room_id),
|
||||
&sender_user,
|
||||
sender_user,
|
||||
EventType::FullyRead,
|
||||
&fully_read_event,
|
||||
&db.globals,
|
||||
|
@ -46,7 +46,7 @@ pub async fn set_read_marker_route(
|
|||
if let Some(event) = &body.read_receipt {
|
||||
db.rooms.edus.private_read_set(
|
||||
&body.room_id,
|
||||
&sender_user,
|
||||
sender_user,
|
||||
db.rooms.get_pdu_count(event)?.ok_or(Error::BadRequest(
|
||||
ErrorKind::InvalidParam,
|
||||
"Event does not exist.",
|
||||
|
@ -54,7 +54,7 @@ pub async fn set_read_marker_route(
|
|||
&db.globals,
|
||||
)?;
|
||||
db.rooms
|
||||
.reset_notification_counts(&sender_user, &body.room_id)?;
|
||||
.reset_notification_counts(sender_user, &body.room_id)?;
|
||||
|
||||
let mut user_receipts = BTreeMap::new();
|
||||
user_receipts.insert(
|
||||
|
@ -71,7 +71,7 @@ pub async fn set_read_marker_route(
|
|||
receipt_content.insert(event.to_owned(), receipts);
|
||||
|
||||
db.rooms.edus.readreceipt_update(
|
||||
&sender_user,
|
||||
sender_user,
|
||||
&body.room_id,
|
||||
AnyEphemeralRoomEvent::Receipt(ruma::events::receipt::ReceiptEvent {
|
||||
content: ruma::events::receipt::ReceiptEventContent(receipt_content),
|
||||
|
@ -102,7 +102,7 @@ pub async fn create_receipt_route(
|
|||
|
||||
db.rooms.edus.private_read_set(
|
||||
&body.room_id,
|
||||
&sender_user,
|
||||
sender_user,
|
||||
db.rooms
|
||||
.get_pdu_count(&body.event_id)?
|
||||
.ok_or(Error::BadRequest(
|
||||
|
@ -112,7 +112,7 @@ pub async fn create_receipt_route(
|
|||
&db.globals,
|
||||
)?;
|
||||
db.rooms
|
||||
.reset_notification_counts(&sender_user, &body.room_id)?;
|
||||
.reset_notification_counts(sender_user, &body.room_id)?;
|
||||
|
||||
let mut user_receipts = BTreeMap::new();
|
||||
user_receipts.insert(
|
||||
|
@ -128,7 +128,7 @@ pub async fn create_receipt_route(
|
|||
receipt_content.insert(body.event_id.to_owned(), receipts);
|
||||
|
||||
db.rooms.edus.readreceipt_update(
|
||||
&sender_user,
|
||||
sender_user,
|
||||
&body.room_id,
|
||||
AnyEphemeralRoomEvent::Receipt(ruma::events::receipt::ReceiptEvent {
|
||||
content: ruma::events::receipt::ReceiptEventContent(receipt_content),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue