- const banReason = userStillExists &&
- window.prompt(`Benutzer „${username}“ sperren?\n\nGrund:`, "Spam");
- const shouldCloseReport = isPostReported(post) && window.confirm("Meldung zum Beitrag schließen?");
-
- /* Initially, I wanted to use Promise.allSettled() below to trigger and wait
- * for all actions in parallel. But that made at least one of them fail in
- * most cases. Not sure, if there was a mistake in here somewhere (totally
- * not impossible) or if phpBB just does not cope well with parallel mod
- * actions (there are some session IDs and confirm_keys involved when a mod
- * action is executed and confirmed).
+ const banReasonPrompt = userStillExists &&
+ asyncPrompt(`Benutzer „${username}“ sperren?\n\nGrund:`, "Spam");
+
+ /* Mod actions via mcp.php involve a confirm_key which is stored in the
+ * database when an action is requested until it is confirmed. There can only
+ * be one confirm_key stored at a time---meaning there cannot be multiple mcp
+ * actions executed concurrently. See confirm_box() in
+ * phpBB/includes/functions.php.