mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Support marking a room as a direct message room (#92)
This commit is contained in:
parent
82645c8828
commit
a98bbd97be
3 changed files with 47 additions and 0 deletions
|
@ -249,6 +249,16 @@ impl RoomState {
|
|||
|
||||
Ok(vec![(act, cmd.context.clone())])
|
||||
},
|
||||
RoomAction::SetDirect(is_direct) => {
|
||||
let room = store
|
||||
.application
|
||||
.get_joined_room(self.id())
|
||||
.ok_or(UIError::Application(IambError::NotJoined))?;
|
||||
|
||||
room.set_is_direct(is_direct).await.map_err(IambError::from)?;
|
||||
|
||||
Ok(vec![])
|
||||
},
|
||||
RoomAction::Set(field, value) => {
|
||||
let room = store
|
||||
.application
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue