🚧 Add Avatar management and refresh the Matrix client part

This commit is contained in:
2024-05-17 22:41:35 +02:00
parent 0b898dce52
commit fdae149c4a
5 changed files with 399 additions and 311 deletions

View File

@@ -5,8 +5,8 @@ use tokio::sync::broadcast::Receiver;
use super::{
common::{Avatar, UserId},
room_member::RoomMember,
room::{Invitation, Room, RoomId},
room_member::{AvatarUrl, RoomMember},
space::Space,
};
use crate::infrastructure::messaging::matrix::account_event::AccountEvent;
@@ -35,6 +35,7 @@ pub trait RoomMessagingConsumerInterface {
async fn on_new_topic(&self, _topic: Option<String>) {}
async fn on_new_name(&self, _name: Option<String>) {}
async fn on_new_avatar(&self, _url: Option<Avatar>) {}
#[allow(dead_code)]
async fn on_membership(&self, _member: RoomMember) {}
@@ -63,5 +64,6 @@ pub trait MemberMessagingProviderInterface {
&self,
room_id: &RoomId,
user_id: &UserId,
avatar_url: &Option<AvatarUrl>,
) -> anyhow::Result<Option<Avatar>>;
}