Add the capability to join a conversation

This commit is contained in:
2024-09-08 16:07:13 +02:00
parent 648be8ba72
commit 9d95bd4481
8 changed files with 76 additions and 21 deletions

View File

@@ -33,7 +33,6 @@ pub struct Store {
pub struct Room {
store: RefCell<Store>,
#[allow(dead_code)]
domain: Rc<dyn RoomStoreConsumerInterface>,
}
@@ -57,6 +56,10 @@ impl Room {
}
}
pub async fn join(&self) {
self.domain.join().await;
}
#[allow(dead_code)]
pub async fn get_avatar(&self) -> Option<Avatar> {
self.domain.avatar().await
@@ -81,6 +84,11 @@ impl RoomStoreProviderInterface for Room {
fn on_new_member(&self, member: RoomMember) {
let mut store = self.store.borrow_mut();
if member.is_account_user() {
store.is_invited.set(false);
}
store.members.write().push(member);
}