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.
Files changed (2) hide show
  1. package/lib/index.js +4 -2
  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
- ctx.bots[`${params.plantform}:${params.account}`].sendMessage(params.groupID, message);
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, message)) {
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-weibo-post-monitor",
3
3
  "description": "微博帖子更新推送插件,用于获取指定微博用户的最新帖子推送到指定群聊,参考代码https://github.com/moehuhu/weibo-monitor",
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [