openclaw-app 1.0.9 → 1.1.1
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/index.ts +5 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -901,6 +901,7 @@ async function handleInbound(ctx: any, accountId: string, msg: any) {
|
|
|
901
901
|
const senderId = msg.senderId ?? "mobile-user";
|
|
902
902
|
const senderName = msg.senderName ?? "Mobile User";
|
|
903
903
|
const text = String(msg.content);
|
|
904
|
+
const chatSessionKey = msg.chatSessionKey ? String(msg.chatSessionKey) : null;
|
|
904
905
|
|
|
905
906
|
try {
|
|
906
907
|
const cfg = runtime.config.loadConfig();
|
|
@@ -1000,12 +1001,14 @@ async function handleInbound(ctx: any, accountId: string, msg: any) {
|
|
|
1000
1001
|
}
|
|
1001
1002
|
for (const chunk of chunks.length > 0 ? chunks : [replyText]) {
|
|
1002
1003
|
if (!chunk) continue;
|
|
1003
|
-
const
|
|
1004
|
+
const innerPayload: Record<string, unknown> = {
|
|
1004
1005
|
type: "message",
|
|
1005
1006
|
role: "assistant",
|
|
1006
1007
|
content: chunk,
|
|
1007
1008
|
sessionKey: replySessionKey,
|
|
1008
|
-
}
|
|
1009
|
+
};
|
|
1010
|
+
if (chatSessionKey) innerPayload.chatSessionKey = chatSessionKey;
|
|
1011
|
+
const plainMsg = JSON.stringify(innerPayload);
|
|
1009
1012
|
const encrypted = JSON.parse(await e2eEncrypt(sessionE2E, plainMsg));
|
|
1010
1013
|
encrypted.sessionKey = replySessionKey;
|
|
1011
1014
|
const outMsg = JSON.stringify(encrypted);
|
package/openclaw.plugin.json
CHANGED