mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-27 04:14:51 +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 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 futures::{try_join, Stream, TryFutureExt};
|
||||||
use ruma::{
|
use ruma::{
|
||||||
api::appservice::event::push_events::v1::EphemeralData,
|
api::appservice::event::push_events::v1::EphemeralData,
|
||||||
|
@ -61,6 +63,7 @@ impl Service {
|
||||||
.flush_room(room_id)
|
.flush_room(room_id)
|
||||||
.await
|
.await
|
||||||
.expect("room flush failed");
|
.expect("room flush failed");
|
||||||
|
debug_info!("send read receipt to appservices");
|
||||||
// update appservices
|
// update appservices
|
||||||
let edu = EphemeralData::Receipt(event);
|
let edu = EphemeralData::Receipt(event);
|
||||||
let mut buf = EduBuf::new();
|
let mut buf = EduBuf::new();
|
||||||
|
|
|
@ -264,6 +264,7 @@ impl Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn appservice_send(&self, room_id: &RoomId) -> Result<()> {
|
async fn appservice_send(&self, room_id: &RoomId) -> Result<()> {
|
||||||
|
debug_info!("Sending typing event to appservice");
|
||||||
let edu = EphemeralData::Typing(EphemeralRoomEvent {
|
let edu = EphemeralData::Typing(EphemeralRoomEvent {
|
||||||
content: self.typings_content(room_id).await,
|
content: self.typings_content(room_id).await,
|
||||||
room_id: room_id.into(),
|
room_id: room_id.into(),
|
||||||
|
|
|
@ -12,7 +12,7 @@ use std::{
|
||||||
|
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use conduwuit::{
|
use conduwuit::{
|
||||||
debug, debug_warn, err, error,
|
debug, debug_info, debug_warn, err, error,
|
||||||
utils::{available_parallelism, math::usize_from_u64_truncated, ReadyExt, TryReadyExt},
|
utils::{available_parallelism, math::usize_from_u64_truncated, ReadyExt, TryReadyExt},
|
||||||
warn, Result, Server,
|
warn, Result, Server,
|
||||||
};
|
};
|
||||||
|
@ -254,6 +254,7 @@ impl Service {
|
||||||
.appservice_in_room(room_id, appservice)
|
.appservice_in_room(room_id, appservice)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
|
debug_info!("send EDU to appservice {}", appservice.registration.id);
|
||||||
self.send_edu_appservice(&appservice.registration.id, serialized.clone())?;
|
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 base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine as _};
|
||||||
use conduwuit::{
|
use conduwuit::{
|
||||||
debug, err, error,
|
debug, debug_info, err, error,
|
||||||
result::LogErr,
|
result::LogErr,
|
||||||
trace,
|
trace,
|
||||||
utils::{calculate_hash, continue_exponential_backoff_secs, stream::IterStream, ReadyExt},
|
utils::{calculate_hash, continue_exponential_backoff_secs, stream::IterStream, ReadyExt},
|
||||||
|
@ -668,6 +668,7 @@ impl Service {
|
||||||
id: String,
|
id: String,
|
||||||
events: Vec<SendingEvent>,
|
events: Vec<SendingEvent>,
|
||||||
) -> SendingResult {
|
) -> SendingResult {
|
||||||
|
debug_info!("Sending events to appservice {}", id);
|
||||||
let Some(appservice) = self.services.appservice.get_registration(&id).await else {
|
let Some(appservice) = self.services.appservice.get_registration(&id).await else {
|
||||||
return Err((
|
return Err((
|
||||||
Destination::Appservice(id.clone()),
|
Destination::Appservice(id.clone()),
|
||||||
|
|
Loading…
Add table
Reference in a new issue