From ab786760a16c07031fa9b7e8987ebe755a57912c Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Wed, 12 Nov 2025 10:32:46 +0700
Subject: further fixes to engagement flow

---
 gui/src/components/post/Footer.tsx | 32 ++++++--------------------------
 1 file changed, 6 insertions(+), 26 deletions(-)

(limited to 'gui/src/components/post/Footer.tsx')

diff --git a/gui/src/components/post/Footer.tsx b/gui/src/components/post/Footer.tsx
index a87c1f8..87f45f3 100644
--- a/gui/src/components/post/Footer.tsx
+++ b/gui/src/components/post/Footer.tsx
@@ -51,7 +51,7 @@ function Footer({ poast, refetch }: PostProps) {
   async function cancelRP(e: React.MouseEvent) {
     e.stopPropagation();
     e.preventDefault();
-    const r = await api!.deletePost(our);
+    const r = await api!.deletePost(poast.host, poast.id);
     if (r) toast.success("Repost deleted");
     // refetch();
     if (location.includes(poast.id)) navigate("/");
@@ -60,31 +60,11 @@ function Footer({ poast, refetch }: PostProps) {
     // TODO update backend because contents are only markdown now
     e.stopPropagation();
     e.preventDefault();
-    // const c = [
-    //   {
-    //     ref: {
-    //       type: "trill",
-    //       ship: poast.host,
-    //       path: `/${poast.id}`,
-    //     },
-    //   },
-    // ];
-    // const post: SentPoast = {
-    //   host: our,
-    //   author: our,
-    //   thread: null,
-    //   parent: null,
-    //   contents: input,
-    //   read: openLock,
-    //   write: openLock,
-    //   tags: [], // TODO
-    // };
-    // const r = await api!.addPost(post, false);
-    // setReposting(true);
-    // if (r) {
-    //   setReposting(false);
-    //   toast.success("Your post was published");
-    // }
+    const pid = { ship: poast.host, id: poast.id };
+    const r = await api!.addRP(pid);
+    if (r) {
+      toast.success("Your repost was published");
+    }
   }
   function doReact(e: React.MouseEvent) {
     e.stopPropagation();
-- 
cgit v1.2.3

