mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-17 02:38:18 -07:00
Remove another unnecessary use of an event enum
This commit is contained in:
parent
583ec51f9f
commit
5db4c001d1
@ -4,7 +4,7 @@ use ruma::{
|
||||
error::ErrorKind,
|
||||
r0::{read_marker::set_read_marker, receipt::create_receipt},
|
||||
},
|
||||
events::{AnyEphemeralRoomEvent, EventType},
|
||||
events::EventType,
|
||||
receipt::ReceiptType,
|
||||
MilliSecondsSinceUnixEpoch,
|
||||
};
|
||||
@ -73,10 +73,10 @@ pub async fn set_read_marker_route(
|
||||
db.rooms.edus.readreceipt_update(
|
||||
sender_user,
|
||||
&body.room_id,
|
||||
AnyEphemeralRoomEvent::Receipt(ruma::events::receipt::ReceiptEvent {
|
||||
ruma::events::receipt::ReceiptEvent {
|
||||
content: ruma::events::receipt::ReceiptEventContent(receipt_content),
|
||||
room_id: body.room_id.clone(),
|
||||
}),
|
||||
},
|
||||
&db.globals,
|
||||
)?;
|
||||
}
|
||||
@ -130,10 +130,10 @@ pub async fn create_receipt_route(
|
||||
db.rooms.edus.readreceipt_update(
|
||||
sender_user,
|
||||
&body.room_id,
|
||||
AnyEphemeralRoomEvent::Receipt(ruma::events::receipt::ReceiptEvent {
|
||||
ruma::events::receipt::ReceiptEvent {
|
||||
content: ruma::events::receipt::ReceiptEventContent(receipt_content),
|
||||
room_id: body.room_id.clone(),
|
||||
}),
|
||||
},
|
||||
&db.globals,
|
||||
)?;
|
||||
|
||||
|
@ -2,7 +2,8 @@ use crate::{database::abstraction::Tree, utils, Error, Result};
|
||||
use ruma::{
|
||||
events::{
|
||||
presence::{PresenceEvent, PresenceEventContent},
|
||||
AnyEphemeralRoomEvent, SyncEphemeralRoomEvent,
|
||||
receipt::ReceiptEvent,
|
||||
SyncEphemeralRoomEvent,
|
||||
},
|
||||
presence::PresenceState,
|
||||
serde::Raw,
|
||||
@ -31,7 +32,7 @@ impl RoomEdus {
|
||||
&self,
|
||||
user_id: &UserId,
|
||||
room_id: &RoomId,
|
||||
event: AnyEphemeralRoomEvent,
|
||||
event: ReceiptEvent,
|
||||
globals: &super::super::globals::Globals,
|
||||
) -> Result<()> {
|
||||
let mut prefix = room_id.as_bytes().to_vec();
|
||||
|
@ -46,7 +46,7 @@ use ruma::{
|
||||
member::{MembershipState, RoomMemberEventContent},
|
||||
server_acl::RoomServerAclEventContent,
|
||||
},
|
||||
AnyEphemeralRoomEvent, EventType,
|
||||
EventType,
|
||||
},
|
||||
int,
|
||||
receipt::ReceiptType,
|
||||
@ -795,10 +795,10 @@ pub async fn send_transaction_message_route(
|
||||
let mut receipt_content = BTreeMap::new();
|
||||
receipt_content.insert(event_id.to_owned(), receipts);
|
||||
|
||||
let event = AnyEphemeralRoomEvent::Receipt(ReceiptEvent {
|
||||
let event = ReceiptEvent {
|
||||
content: ReceiptEventContent(receipt_content),
|
||||
room_id: room_id.clone(),
|
||||
});
|
||||
};
|
||||
db.rooms.edus.readreceipt_update(
|
||||
&user_id,
|
||||
&room_id,
|
||||
|
Loading…
Reference in New Issue
Block a user