@qihoo/tuitui-openclaw-channel 1.0.34 → 1.0.35

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/package.json +1 -1
  2. package/src/outbound.ts +3 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qihoo/tuitui-openclaw-channel",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "maintainers": [
5
5
  {
6
6
  "name": "huzunjie",
package/src/outbound.ts CHANGED
@@ -105,10 +105,8 @@ export async function sendTextMsg(
105
105
  // 澄清:不再使用 atList 参数;统一从文本中提取 at 目标;
106
106
  // 因为 atList 参数上层固定写死的填写为 发消息人,如果是机器人这样可能导致机器人之间at产生死循环。
107
107
  if (chatType == CHAT_TYPE_CHANNEL) {
108
-
109
- const content_with_newline = replaceSingleNewlines(content);
110
- const content_with_mention = replaceMentions(content_with_newline);
111
- const has_at = (content_with_mention != content_with_newline);
108
+ const content_with_mention = replaceMentions(content);
109
+ const has_at = (content_with_mention != content);
112
110
  try {
113
111
  if (has_at && content.indexOf("禁止@") != -1) throw Error("触发魔法词");
114
112
  const msg: TuiTuiOutboundTeamsMarkdownMessage = {
@@ -128,7 +126,7 @@ export async function sendTextMsg(
128
126
  ...getTargets(chatId, chatType),
129
127
  msgtype: 'richtext/markdown',
130
128
  richtext: {
131
- markdown: content_with_newline,
129
+ markdown: content,
132
130
  delims_left: "",
133
131
  delims_right: ""
134
132
  },