Browse Source

Made approval on remove_process configurable

Nathan Schneider 1 year ago
parent
commit
4337e5511b
1 changed files with 6 additions and 4 deletions
  1. 6 4
      modpol_core/modules/remove_process.lua

+ 6 - 4
modpol_core/modules/remove_process.lua

@@ -4,7 +4,7 @@
 local remove_process = {
     name = "Remove process",
     slug = "remove_process",
-    desc = "User can remove own processes, consent required for those of others",
+    desc = "User can remove own processes, approval required for those of others",
     hide = false;
 }
 
@@ -12,6 +12,7 @@ remove_process.data = {
 }
 
 remove_process.config = {
+   approval_module = "consent"
 }
 
 --- Initiate function
@@ -71,11 +72,12 @@ function remove_process:initiate(result)
                      self.org:delete_process(self.id)
                   else
                      self:call_module(
-                        "consent",
+                        approval_module,
                         self.initiator,
                         {
-                           prompt = "Approve removal of process "..process_choice.."?",
-                           votes_required = #self.org.members
+                           prompt =
+                              "Approve removal of process "
+                              ..process_choice.."?"
                         },
                         function(input)
                            modpol.interactions.message_org(