@keychat-io/keychat 0.1.27 → 0.1.28

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/channel.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keychat-io/keychat",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "Keychat — E2E encrypted chat + Lightning wallet for OpenClaw agents",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
package/src/channel.ts CHANGED
@@ -306,7 +306,7 @@ const mlsInitialized = new Set<string>();
306
306
  * Normalize a pubkey: strip nostr: prefix, handle npub/hex.
307
307
  */
308
308
  function normalizePubkey(input: string): string {
309
- const trimmed = input.replace(/^nostr:/i, "").trim();
309
+ const trimmed = input.replace(/^nostr:/i, "").replace(/^keychat:/i, "").trim();
310
310
  // If it's hex, lowercase it
311
311
  if (/^[0-9a-fA-F]{64}$/.test(trimmed)) {
312
312
  return trimmed.toLowerCase();
@@ -2261,7 +2261,7 @@ async function dispatchToAgent(
2261
2261
  Surface: "keychat" as const,
2262
2262
  MessageSid: eventId,
2263
2263
  OriginatingChannel: "keychat" as const,
2264
- OriginatingTo: `keychat:${accountId}`,
2264
+ OriginatingTo: `keychat:${peerNostrPubkey}`,
2265
2265
  ...(mediaPath ? { MediaPath: mediaPath } : {}),
2266
2266
  });
2267
2267