浏览代码

:bug: 添加遗漏的 `urlencodeTab` 函数

Mizore 1 年之前
父节点
当前提交
45eb36838e
共有 2 个文件被更改,包括 10 次插入10 次删除
  1. 0 10
      script/util_notify.lua
  2. 10 0
      script/util_notify_channel.lua

+ 0 - 10
script/util_notify.lua

@@ -8,16 +8,6 @@ local msg_queue = {}
 local msg_count = 0
 local msg_count = 0
 local error_count = 0
 local error_count = 0
 
 
-local function urlencodeTab(params)
-    local msg = {}
-    for k, v in pairs(params) do
-        table.insert(msg, string.urlEncode(k) .. "=" .. string.urlEncode(v))
-        table.insert(msg, "&")
-    end
-    table.remove(msg)
-    return table.concat(msg)
-end
-
 --- 发送通知
 --- 发送通知
 -- @param msg 消息内容
 -- @param msg 消息内容
 -- @param channel 通知渠道
 -- @param channel 通知渠道

+ 10 - 0
script/util_notify_channel.lua

@@ -1,5 +1,15 @@
 local lib_smtp = require "lib_smtp"
 local lib_smtp = require "lib_smtp"
 
 
+local function urlencodeTab(params)
+    local msg = {}
+    for k, v in pairs(params) do
+        table.insert(msg, string.urlEncode(k) .. "=" .. string.urlEncode(v))
+        table.insert(msg, "&")
+    end
+    table.remove(msg)
+    return table.concat(msg)
+end
+
 return {
 return {
     -- 发送到 custom_post
     -- 发送到 custom_post
     ["custom_post"] = function(msg)
     ["custom_post"] = function(msg)