-
WebSocket Server 配置
+ HTTP Server 配置
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
-
-
-
+
-
-
+
+
@@ -34,9 +34,9 @@
diff --git a/src/onebot/config/config.ts b/src/onebot/config/config.ts
index c4c34b20..7938106f 100644
--- a/src/onebot/config/config.ts
+++ b/src/onebot/config/config.ts
@@ -42,7 +42,6 @@ export const httpServerDefaultConfigs = createDefaultAdapterConfig({
enableCors: true,
enableWebsocket: true,
messagePostFormat: 'array',
- reportSelfMessage: false,
token: '',
debug: false,
});
@@ -63,13 +62,13 @@ export const websocketServerDefaultConfigs = createDefaultAdapterConfig({
name: 'websocket-server',
enable: false as boolean,
host: '0.0.0.0',
- port: 3002,
+ port: 3001,
messagePostFormat: 'array',
reportSelfMessage: false,
token: '',
enablePushEvent: true,
debug: false,
- heartInterval: 0,
+ heartInterval: 30000,
});
export type WebsocketServerConfig = typeof websocketServerDefaultConfigs;
@@ -81,7 +80,7 @@ export const websocketClientDefaultConfigs = createDefaultAdapterConfig({
reportSelfMessage: false,
token: '',
debug: false,
- heartInterval: 0,
+ heartInterval: 30000,
});
export type WebsocketClientConfig = typeof websocketClientDefaultConfigs;
@@ -166,7 +165,6 @@ export function migrateOneBotConfigsV1(config: Partial
): OneBotConfig
token: config.http.secret,
debug: config.debug,
messagePostFormat: config.messagePostFormat,
- reportSelfMessage: config.reportSelfMessage,
}),
];
}
diff --git a/src/onebot/index.ts b/src/onebot/index.ts
index 2c930c5e..b7537dc0 100644
--- a/src/onebot/index.ts
+++ b/src/onebot/index.ts
@@ -616,7 +616,7 @@ export class NapCatOneBot11Adapter {
} else if (ob11Msg.stringMsg.message.length === 0 || ob11Msg.arrayMsg.message.length == 0) {
return;
}
- const notreportSelf_network = network.flat().filter((e) => e.enable && !e.reportSelfMessage);
+ const notreportSelf_network = network.flat().filter((e) => e.enable && (('reportSelfMessage' in e && !e.reportSelfMessage) || !('reportSelfMessage' in e)));
if (isSelfMsg) {
for (const adapter of notreportSelf_network) {
msgMap.delete(adapter.name);