diff --git a/package.json b/package.json index fd8bb26..07157c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yz-yuki-plugin", - "version": "2.0.6-3", + "version": "2.0.6-4", "description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件", "author": "snowtafir", "type": "module", @@ -60,6 +60,7 @@ "axios": "^1.7.9", "chokidar": "^4.0.1", "husky": "^9.1.6", + "icqq": "^0.6.10", "jsdom": "^24.1.1", "json5": "^2.2.3", "jsxp": "^1.0.8", diff --git a/src/models/weibo/weibo.query.ts b/src/models/weibo/weibo.query.ts index 626657a..0f007e1 100644 --- a/src/models/weibo/weibo.query.ts +++ b/src/models/weibo/weibo.query.ts @@ -31,8 +31,10 @@ export class WeiboQuery { return 'DYNAMIC_TYPE_AV'; } else if (raw_post?.mblog?.pics) { return 'DYNAMIC_TYPE_DRAW'; - } else { + } else if (!raw_post?.mblog?.pics && String(raw_post?.mblog?.text).trim().length > 0) { return 'DYNAMIC_TYPE_ARTICLE'; + } else { + return 'DYNAMIC_TYPE_UNKNOWN'; } } @@ -85,7 +87,7 @@ export class WeiboQuery { /**头像框 */ formatData.data.pendant = ''; - + /**生成日期 */ formatData.data.created = moment().format('YYYY年MM月DD日 HH:mm:ss'); formatData.data.type = type; @@ -134,6 +136,8 @@ export class WeiboQuery { formatData.data.orig = await this.formatDynamicData(origin_post_info); formatData.data.category = '转发动态'; break; + default: + break; } return {