Skip to content

Commit

Permalink
Disallow users from inviting others to private modmail threads (#25)
Browse files Browse the repository at this point in the history
Should close #15.
  • Loading branch information
wackbyte authored May 1, 2024
1 parent 56633af commit 849901a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/commands/modmail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ async fn create_modmail_thread(
)
.await?;

// disallow users from inviting others to modmail threads
modmail_thread
.edit_thread(ctx, |edit_thread| edit_thread.invitable(false))
.await?;

let thread_message_content = format!(
"Hey {}, {} needs help with the following:\n> {}",
ctx.data().mod_role_id.mention(),
Expand Down

0 comments on commit 849901a

Please sign in to comment.