add: don't allow poll creator to vote
add: unfollow user when you block them add: force other user to unfollow you by blocking them add: leave receiver communities when you block them
This commit is contained in:
parent
5a330b7a18
commit
460e87e90e
11 changed files with 165 additions and 17 deletions
|
@ -70,7 +70,16 @@ pub async fn create_request(
|
|||
let poll_id = if let Some(p) = req.poll {
|
||||
match data
|
||||
.create_poll(Poll::new(
|
||||
user.id, 86400000, p.option_a, p.option_b, p.option_c, p.option_d,
|
||||
user.id,
|
||||
if let Some(expires) = p.expires {
|
||||
expires
|
||||
} else {
|
||||
86400000
|
||||
},
|
||||
p.option_a,
|
||||
p.option_b,
|
||||
p.option_c,
|
||||
p.option_d,
|
||||
))
|
||||
.await
|
||||
{
|
||||
|
|
|
@ -429,6 +429,8 @@ pub struct CreatePostPoll {
|
|||
pub option_b: String,
|
||||
pub option_c: String,
|
||||
pub option_d: String,
|
||||
#[serde(default)]
|
||||
pub expires: Option<usize>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue