fix: client share intents

This commit is contained in:
trisua 2025-06-26 13:53:19 -04:00
parent 5bfbd4e110
commit 904944f5d3

View file

@ -587,17 +587,17 @@
}, },
); );
self.define("intent_twitter", (_, text) => { self.define("intent_twitter", async (_, text_promise) => {
window.open( window.open(
`https://twitter.com/intent/tweet?text=${encodeURIComponent(text)}`, `https://twitter.com/intent/tweet?text=${encodeURIComponent(await text_promise)}`,
); );
trigger("atto::toast", ["success", "Opened intent!"]); trigger("atto::toast", ["success", "Opened intent!"]);
}); });
self.define("intent_bluesky", (_, text) => { self.define("intent_bluesky", async (_, text_promise) => {
window.open( window.open(
`https://bsky.app/intent/compose?text=${encodeURIComponent(text)}`, `https://bsky.app/intent/compose?text=${encodeURIComponent(await text_promise)}`,
); );
trigger("atto::toast", ["success", "Opened intent!"]); trigger("atto::toast", ["success", "Opened intent!"]);