summaryrefslogtreecommitdiffhomepage
path: root/js/src/share
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-05-30 13:58:46 -0400
committerDax Raad <[email protected]>2025-05-30 14:40:59 -0400
commit42c7880858ee9bec72f3fb71c7f19512a38b0b8e (patch)
tree4e05a29314d2aeb21c644a87b1dcf217ce77bd13 /js/src/share
parent017a440a700dbaf64912695265f2f553b2c9c079 (diff)
downloadopencode-42c7880858ee9bec72f3fb71c7f19512a38b0b8e.tar.gz
opencode-42c7880858ee9bec72f3fb71c7f19512a38b0b8e.zip
sync
Diffstat (limited to 'js/src/share')
-rw-r--r--js/src/share/share.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/src/share/share.ts b/js/src/share/share.ts
index 62dee63a7..8d4af8795 100644
--- a/js/src/share/share.ts
+++ b/js/src/share/share.ts
@@ -16,7 +16,8 @@ export namespace Share {
if (root !== "session") return;
const [, sessionID] = splits;
const session = await Session.get(sessionID);
- if (!session.shareID) return;
+ if (!session.share) return;
+ const { secret } = session.share;
const key = payload.properties.key;
pending.set(key, payload.properties.content);
@@ -31,7 +32,7 @@ export namespace Share {
method: "POST",
body: JSON.stringify({
sessionID: sessionID,
- shareID: session.shareID,
+ secret,
key: key,
content,
}),
@@ -61,6 +62,6 @@ export namespace Share {
body: JSON.stringify({ sessionID: sessionID }),
})
.then((x) => x.json())
- .then((x) => x.shareID);
+ .then((x) => x as { url: string; secret: string });
}
}