@alemonjs/bubble 2.1.3 → 2.1.4

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/format.js CHANGED
@@ -68,8 +68,7 @@ const markdownToBubbleText = (items, hideUnsupported) => {
68
68
  return String(item?.value ?? '');
69
69
  }
70
70
  })
71
- .join('')
72
- .trim();
71
+ .join('');
73
72
  };
74
73
  const markdownRawToBubbleText = (raw, hideUnsupported) => {
75
74
  if (Number(hideUnsupported) >= 4)
package/lib/send.js CHANGED
@@ -151,7 +151,7 @@ const sendToRoom = async (client, param, val) => {
151
151
  })
152
152
  .join('');
153
153
  const contentMd = buildBubbleMdContent(mdAndButtons);
154
- const finalContent = [content, contentMd, fallbackText].filter(Boolean).join('\n');
154
+ const finalContent = [content, contentMd, fallbackText].filter(Boolean).join('\n').replace(/^[^\S\n\r]+|[^\S\n\r]+$/g, '');
155
155
  if (hide && !finalContent && images.length <= 0) {
156
156
  logger.info('[bubble] hideUnsupported: 消息内容转换后为空,跳过发送');
157
157
  return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alemonjs/bubble",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "bubble platform",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",