mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-26 23:36:37 +02:00
add additional logging
This commit is contained in:
parent
d26d5cfa3a
commit
4e7ddd0848
4 changed files with 9 additions and 3 deletions
|
@ -2,7 +2,9 @@ mod data;
|
|||
|
||||
use std::{collections::BTreeMap, sync::Arc};
|
||||
|
||||
use conduwuit::{debug, err, result::LogErr, warn, PduCount, PduId, RawPduId, Result};
|
||||
use conduwuit::{
|
||||
debug, debug_info, err, result::LogErr, warn, PduCount, PduId, RawPduId, Result,
|
||||
};
|
||||
use futures::{try_join, Stream, TryFutureExt};
|
||||
use ruma::{
|
||||
api::appservice::event::push_events::v1::EphemeralData,
|
||||
|
@ -61,6 +63,7 @@ impl Service {
|
|||
.flush_room(room_id)
|
||||
.await
|
||||
.expect("room flush failed");
|
||||
debug_info!("send read receipt to appservices");
|
||||
// update appservices
|
||||
let edu = EphemeralData::Receipt(event);
|
||||
let mut buf = EduBuf::new();
|
||||
|
|
|
@ -264,6 +264,7 @@ impl Service {
|
|||
}
|
||||
|
||||
async fn appservice_send(&self, room_id: &RoomId) -> Result<()> {
|
||||
debug_info!("Sending typing event to appservice");
|
||||
let edu = EphemeralData::Typing(EphemeralRoomEvent {
|
||||
content: self.typings_content(room_id).await,
|
||||
room_id: room_id.into(),
|
||||
|
|
|
@ -12,7 +12,7 @@ use std::{
|
|||
|
||||
use async_trait::async_trait;
|
||||
use conduwuit::{
|
||||
debug, debug_warn, err, error,
|
||||
debug, debug_info, debug_warn, err, error,
|
||||
utils::{available_parallelism, math::usize_from_u64_truncated, ReadyExt, TryReadyExt},
|
||||
warn, Result, Server,
|
||||
};
|
||||
|
@ -254,6 +254,7 @@ impl Service {
|
|||
.appservice_in_room(room_id, appservice)
|
||||
.await
|
||||
{
|
||||
debug_info!("send EDU to appservice {}", appservice.registration.id);
|
||||
self.send_edu_appservice(&appservice.registration.id, serialized.clone())?;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ use std::{
|
|||
|
||||
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine as _};
|
||||
use conduwuit::{
|
||||
debug, err, error,
|
||||
debug, debug_info, err, error,
|
||||
result::LogErr,
|
||||
trace,
|
||||
utils::{calculate_hash, continue_exponential_backoff_secs, stream::IterStream, ReadyExt},
|
||||
|
@ -668,6 +668,7 @@ impl Service {
|
|||
id: String,
|
||||
events: Vec<SendingEvent>,
|
||||
) -> SendingResult {
|
||||
debug_info!("Sending events to appservice {}", id);
|
||||
let Some(appservice) = self.services.appservice.get_registration(&id).await else {
|
||||
return Err((
|
||||
Destination::Appservice(id.clone()),
|
||||
|
|
Loading…
Add table
Reference in a new issue