@cxyhhhhh/openclaw-qqbot 1.6.7-alpha.1 → 1.6.7-alpha.2

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.
@@ -1,7 +1,7 @@
1
1
  import WebSocket from "ws";
2
2
  import path from "node:path";
3
3
  import fs from "node:fs";
4
- import { getAccessToken, getGatewayUrl, sendC2CMessage, sendChannelMessage, sendGroupMessage, clearTokenCache, initApiConfig, startBackgroundTokenRefresh, stopBackgroundTokenRefresh, sendC2CInputNotify, onMessageSent, PLUGIN_USER_AGENT, sendProactiveGroupMessage, acknowledgeInteraction, getApiPluginVersion } from "./api.js";
4
+ import { getAccessToken, getGatewayUrl, sendC2CMessage, sendChannelMessage, sendGroupMessage, clearTokenCache, initApiConfig, startBackgroundTokenRefresh, stopBackgroundTokenRefresh, sendC2CInputNotify, onMessageSent, PLUGIN_USER_AGENT, acknowledgeInteraction, getApiPluginVersion } from "./api.js";
5
5
  import { loadSession, saveSession, clearSession } from "./session-store.js";
6
6
  import { recordKnownUser, flushKnownUsers } from "./known-users.js";
7
7
  import { getQQBotRuntime } from "./runtime.js";
@@ -880,7 +880,7 @@ export async function startGateway(ctx) {
880
880
  limit: historyLimit,
881
881
  entry: {
882
882
  sender: senderForHistory,
883
- body: event.content,
883
+ body: parseFaceTags(event.content),
884
884
  timestamp: new Date(event.timestamp).getTime(),
885
885
  messageId: event.messageId,
886
886
  attachments: historyAttachments,
@@ -907,7 +907,7 @@ export async function startGateway(ctx) {
907
907
  limit: historyLimit,
908
908
  entry: {
909
909
  sender: senderForHistory,
910
- body: event.content,
910
+ body: parseFaceTags(event.content),
911
911
  timestamp: new Date(event.timestamp).getTime(),
912
912
  messageId: event.messageId,
913
913
  attachments: historyAttachments,
@@ -1841,18 +1841,6 @@ export async function startGateway(ctx) {
1841
1841
  groupOpenid: event.group_openid,
1842
1842
  accountId: account.accountId,
1843
1843
  });
1844
- // 发送入群欢迎
1845
- (async () => {
1846
- try {
1847
- const token = await getAccessToken(account.appId, account.clientSecret);
1848
- const greeting = `嗨~我来啦!有事随时喊我就好 😄`;
1849
- await sendProactiveGroupMessage(token, event.group_openid, greeting);
1850
- log?.info(`[qqbot:${account.accountId}] Sent welcome message to group: ${event.group_openid}`);
1851
- }
1852
- catch (err) {
1853
- log?.debug?.(`[qqbot:${account.accountId}] Failed to send welcome message to group ${event.group_openid}: ${err}`);
1854
- }
1855
- })();
1856
1844
  }
1857
1845
  else if (t === "GROUP_DEL_ROBOT") {
1858
1846
  const event = d;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cxyhhhhh/openclaw-qqbot",
3
- "version": "1.6.7-alpha.1",
3
+ "version": "1.6.7-alpha.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/gateway.ts CHANGED
@@ -1055,7 +1055,7 @@ export async function startGateway(ctx: GatewayContext): Promise<void> {
1055
1055
  limit: historyLimit,
1056
1056
  entry: {
1057
1057
  sender: senderForHistory,
1058
- body: event.content,
1058
+ body: parseFaceTags(event.content),
1059
1059
  timestamp: new Date(event.timestamp).getTime(),
1060
1060
  messageId: event.messageId,
1061
1061
  attachments: historyAttachments,
@@ -1084,7 +1084,7 @@ export async function startGateway(ctx: GatewayContext): Promise<void> {
1084
1084
  limit: historyLimit,
1085
1085
  entry: {
1086
1086
  sender: senderForHistory,
1087
- body: event.content,
1087
+ body: parseFaceTags(event.content),
1088
1088
  timestamp: new Date(event.timestamp).getTime(),
1089
1089
  messageId: event.messageId,
1090
1090
  attachments: historyAttachments,
@@ -2068,17 +2068,7 @@ export async function startGateway(ctx: GatewayContext): Promise<void> {
2068
2068
  groupOpenid: event.group_openid,
2069
2069
  accountId: account.accountId,
2070
2070
  });
2071
- // 发送入群欢迎
2072
- (async () => {
2073
- try {
2074
- const token = await getAccessToken(account.appId, account.clientSecret);
2075
- const greeting = `嗨~我来啦!有事随时喊我就好 😄`;
2076
- await sendProactiveGroupMessage(token, event.group_openid, greeting);
2077
- log?.info(`[qqbot:${account.accountId}] Sent welcome message to group: ${event.group_openid}`);
2078
- } catch (err) {
2079
- log?.debug?.(`[qqbot:${account.accountId}] Failed to send welcome message to group ${event.group_openid}: ${err}`);
2080
- }
2081
- })();
2071
+
2082
2072
  } else if (t === "GROUP_DEL_ROBOT") {
2083
2073
  const event = d as { timestamp: string; group_openid: string; op_member_openid: string };
2084
2074
  log?.info(`[qqbot:${account.accountId}] Bot removed from group: ${event.group_openid} by ${event.op_member_openid}`);