Browse Source

:bug: 修复 `CUSTOM_POST_BODY_TABLE` 被错误修改的问题,改为深拷贝

Mizore 2 years ago
parent
commit
6c852d8f59
1 changed files with 1 additions and 1 deletions
  1. 1 1
      script/util_notify.lua

+ 1 - 1
script/util_notify.lua

@@ -29,7 +29,7 @@ local notify = {
             ["content-type"] = config.CUSTOM_POST_CONTENT_TYPE
         }
 
-        local body = config.CUSTOM_POST_BODY_TABLE
+        local body = json.decode(json.encode(config.CUSTOM_POST_BODY_TABLE))
         -- 遍历并替换其中的变量
         local function traverse_and_replace(t)
             for k, v in pairs(t) do