mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 05:26:59 +00:00
Fix: Handle status::User on group create.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
export version=0.5.0-alpha.0-patch.0
|
||||
export version=0.5.0-alpha.1
|
||||
echo "pub const VERSION: &str = \"${version}\";" > src/version.rs
|
||||
|
||||
@@ -38,8 +38,12 @@ pub async fn req(user: User, info: Json<Data>) -> Result<JsonValue> {
|
||||
}
|
||||
|
||||
for target in &set {
|
||||
if get_relationship(&user, target) != RelationshipStatus::Friend {
|
||||
Err(Error::NotFriends)?
|
||||
match get_relationship(&user, target) {
|
||||
RelationshipStatus::Friend |
|
||||
RelationshipStatus::User => {},
|
||||
_ => {
|
||||
return Err(Error::NotFriends);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
pub const VERSION: &str = "0.5.0-alpha.0-patch.0";
|
||||
pub const VERSION: &str = "0.5.0-alpha.1";
|
||||
|
||||
Reference in New Issue
Block a user