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:
trisua 2025-06-05 16:23:57 -04:00
parent 5a330b7a18
commit 460e87e90e
11 changed files with 165 additions and 17 deletions
crates/app/src/routes/api/v1/communities

View file

@ -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
{