koishi-plugin-weibo-post-monitor 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -92,7 +92,7 @@ var getWeiboAndSendMessageToGroup = /* @__PURE__ */ __name(async (ctx, params) =
|
|
|
92
92
|
if (params.sendAll) {
|
|
93
93
|
message = import_koishi.h.at("all") + " " + message;
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
console.log(message);
|
|
96
96
|
}, "getWeiboAndSendMessageToGroup");
|
|
97
97
|
var getLastPost = /* @__PURE__ */ __name((params, weiboList) => {
|
|
98
98
|
for (const wb_element of weiboList) {
|
|
@@ -156,7 +156,7 @@ var getMessage = /* @__PURE__ */ __name((params, wbPost) => {
|
|
|
156
156
|
const mid = wbPost?.mid || "";
|
|
157
157
|
const url = `
|
|
158
158
|
链接:https://m.weibo.cn/status/${mid}`;
|
|
159
|
-
if (!checkWords(params,
|
|
159
|
+
if (!checkWords(params, wbPost?.text_raw)) {
|
|
160
160
|
return null;
|
|
161
161
|
}
|
|
162
162
|
const wbpost = message ? message + url : screenName + " 发布了微博:\n" + wbPost?.text_raw + url || "";
|
|
@@ -232,6 +232,8 @@ var parseDateString = /* @__PURE__ */ __name((dateString) => {
|
|
|
232
232
|
return date;
|
|
233
233
|
}, "parseDateString");
|
|
234
234
|
var checkWords = /* @__PURE__ */ __name((params, message) => {
|
|
235
|
+
if (message == null)
|
|
236
|
+
return false;
|
|
235
237
|
let keywordsList = params.keywords?.split(";") || [];
|
|
236
238
|
let blockwordsList = params.blockwords?.split(";") || [];
|
|
237
239
|
if (keywordsList.length > 0) {
|
package/package.json
CHANGED