Revert "Send read reciept and typing indicator EDUs to appservices with receive_ephemeral"

This reverts commit 3675c941f8.
This commit is contained in:
strawberry 2024-12-18 11:26:18 -05:00
parent 9040ad054e
commit f54a62dda0
8 changed files with 46 additions and 135 deletions

View file

@ -2,10 +2,9 @@ mod data;
use std::{collections::BTreeMap, sync::Arc};
use conduwuit::{debug, err, result::LogErr, warn, PduCount, PduId, RawPduId, Result};
use conduwuit::{debug, err, warn, PduCount, PduId, RawPduId, Result};
use futures::{try_join, Stream, TryFutureExt};
use ruma::{
api::appservice::event::push_events::v1::EphemeralData,
events::{
receipt::{ReceiptEvent, ReceiptEventContent, Receipts},
AnySyncEphemeralRoomEvent, SyncEphemeralRoomEvent,
@ -49,25 +48,14 @@ impl Service {
&self,
user_id: &UserId,
room_id: &RoomId,
event: ReceiptEvent,
event: &ReceiptEvent,
) {
self.db.readreceipt_update(user_id, room_id, &event).await;
self.db.readreceipt_update(user_id, room_id, event).await;
self.services
.sending
.flush_room(room_id)
.await
.expect("room flush failed");
// update appservices
let edu = EphemeralData::Receipt(event);
let _ = self
.services
.sending
.send_edu_appservice_room(
room_id,
serde_json::to_vec(&edu).expect("Serialized EphemeralData::Receipt"),
)
.await
.log_err();
}
/// Gets the latest private read receipt from the user in the room