File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
crates/nostr-mls-storage/src/groups Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,10 @@ impl<'de> Deserialize<'de> for GroupType {
73
73
pub enum GroupState {
74
74
/// The group is active
75
75
Active ,
76
- /// The group is inactive
76
+ /// The group is inactive, this is used for groups that users have left or for welcome messages that have been declined
77
77
Inactive ,
78
+ /// The group is pending, this is used for groups that users are invited to but haven't joined yet
79
+ Pending ,
78
80
}
79
81
80
82
impl fmt:: Display for GroupState {
@@ -89,6 +91,7 @@ impl GroupState {
89
91
match self {
90
92
Self :: Active => "active" ,
91
93
Self :: Inactive => "inactive" ,
94
+ Self :: Pending => "pending" ,
92
95
}
93
96
}
94
97
}
@@ -100,6 +103,7 @@ impl FromStr for GroupState {
100
103
match s {
101
104
"active" => Ok ( Self :: Active ) ,
102
105
"inactive" => Ok ( Self :: Inactive ) ,
106
+ "pending" => Ok ( Self :: Pending ) ,
103
107
_ => Err ( GroupError :: InvalidParameters ( format ! (
104
108
"Invalid group state: {}" ,
105
109
s
You can’t perform that action at this time.
0 commit comments