mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Support sending and accepting room invitations (#7)
This commit is contained in:
parent
b6f4b03c12
commit
54ce042384
8 changed files with 279 additions and 32 deletions
|
@ -72,6 +72,9 @@ pub enum SetRoomField {
|
|||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub enum RoomAction {
|
||||
InviteAccept,
|
||||
InviteReject,
|
||||
InviteSend(OwnedUserId),
|
||||
Members(Box<CommandContext<ProgramContext>>),
|
||||
Set(SetRoomField),
|
||||
}
|
||||
|
@ -180,7 +183,7 @@ pub type IambResult<T> = UIResult<T, IambInfo>;
|
|||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
pub enum IambError {
|
||||
#[error("Unknown room identifier: {0}")]
|
||||
#[error("Invalid user identifier: {0}")]
|
||||
InvalidUserId(String),
|
||||
|
||||
#[error("Invalid verification user/device pair: {0}")]
|
||||
|
@ -213,6 +216,9 @@ pub enum IambError {
|
|||
#[error("Current window is not a room")]
|
||||
NoSelectedRoom,
|
||||
|
||||
#[error("You do not have a current invitation to this room")]
|
||||
NotInvited,
|
||||
|
||||
#[error("You need to join the room before you can do that")]
|
||||
NotJoined,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue