🔊 Trace events from Matrix client callbacks to domain methods

This commit is contained in:
2024-05-21 12:22:04 +02:00
parent b5da0ee992
commit cd6506fb03
11 changed files with 405 additions and 163 deletions

View File

@@ -1,7 +1,7 @@
use std::{cell::RefCell, collections::HashMap, rc::Rc};
use async_trait::async_trait;
use tracing::error;
use tracing::{error, instrument, trace};
use super::{
common::PresenceState,
@@ -95,7 +95,10 @@ impl Account {
#[async_trait(?Send)]
impl AccountMessagingConsumerInterface for Account {
#[instrument(name = "Account", skip_all)]
async fn on_new_room(&self, room: Rc<Room>) -> Rc<dyn RoomMessagingConsumerInterface> {
trace!("on_new_room");
let room_id = room.id().clone();
self.by_id_rooms
@@ -111,7 +114,10 @@ impl AccountMessagingConsumerInterface for Account {
room
}
#[instrument(name = "Account", skip_all)]
async fn on_new_space(&self, space: Rc<Space>) -> Rc<dyn SpaceMessagingConsumerInterface> {
trace!("on_new_space");
let space_id = space.id().clone();
self.by_id_spaces