Skip to content

Commit 849901a

Browse files
authored
Disallow users from inviting others to private modmail threads (kangalio#25)
Should close kangalio#15.
1 parent 56633af commit 849901a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/commands/modmail.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ async fn create_modmail_thread(
179179
)
180180
.await?;
181181

182+
// disallow users from inviting others to modmail threads
183+
modmail_thread
184+
.edit_thread(ctx, |edit_thread| edit_thread.invitable(false))
185+
.await?;
186+
182187
let thread_message_content = format!(
183188
"Hey {}, {} needs help with the following:\n> {}",
184189
ctx.data().mod_role_id.mention(),

0 commit comments

Comments
 (0)