✨ Add the capability to join a conversation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user