yz-yuki-plugin 2.0.7-24 → 2.0.7-25

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.
@@ -60,8 +60,10 @@ banWords:
60
60
  # 设置B站动态消息模式 0 文字模式 1 图片模式
61
61
  pushMsgMode: 1
62
62
 
63
- # 动态过长(>300字)或条数过多(>2条)时是否以转发形式发送动态,默认 1 开启,0 关闭。
63
+ # 动态过长或条图片数过多时是否以转发形式发送动态,默认 1 开启,0 关闭。
64
64
  forwardSendDynamic: 1
65
+ maxPicsForSingleMsg: 2 # 阈值>2张图片时
66
+ maxTextLengthForSingleMsg: 300 # 或阈值>300字时
65
67
 
66
68
  # 文字模式时,文字消息与图片附件是否合并在一起发送,默认 1 合并,0 不合并。
67
69
  # 如果合并时图片过多导致发送失败,可设置为 0 单独发送图片。
@@ -55,8 +55,10 @@ banWords:
55
55
  # 设置微博动态消息模式 0 文字模式 1 图片模式
56
56
  pushMsgMode: 1
57
57
 
58
- # 动态过长(>300字)或条数过多(>2条)时是否以转发形式发送动态,默认 1 开启,0 关闭。
58
+ # 动态过长或条图片数过多时是否以转发形式发送动态,默认 1 开启,0 关闭。
59
59
  forwardSendDynamic: 1
60
+ maxPicsForSingleMsg: 2 # 阈值>2张图片时
61
+ maxTextLengthForSingleMsg: 300 # 或阈值>300字时
60
62
 
61
63
  # 文字模式时,文字消息与图片附件是否合并在一起发送,默认 1 合并,0 不合并。
62
64
  # 如果合并时图片过多导致发送失败,可设置为 0 单独发送图片。
@@ -424,7 +424,7 @@ class BiliTask {
424
424
  }
425
425
  }
426
426
  // 满足条件才使用合并转发
427
- const useForward = imageCount > 2 || textLength > 300;
427
+ const useForward = imageCount > (biliConfigData?.maxPicsForSingleMsg ?? 2) || textLength > (biliConfigData?.maxTextLengthForSingleMsg ?? 300);
428
428
  if (forwardSendDynamic && useForward) {
429
429
  const forwardNodes = [];
430
430
  // 合并所有消息
@@ -370,7 +370,7 @@ class WeiboTask {
370
370
  }
371
371
  }
372
372
  // 满足条件才使用合并转发
373
- const useForward = imageCount > 2 || textLength > 300;
373
+ const useForward = imageCount > (weiboConfigData?.maxPicsForSingleMsg ?? 2) || textLength > (weiboConfigData?.maxTextLengthForSingleMsg ?? 300);
374
374
  if (forwardSendDynamic && useForward) {
375
375
  const forwardNodes = [];
376
376
  // 合并所有消息
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yz-yuki-plugin",
3
- "version": "2.0.7-24",
3
+ "version": "2.0.7-25",
4
4
  "description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件",
5
5
  "author": "snowtafir",
6
6
  "type": "module",