about summary refs log tree commit diff
path: root/src/state/models/post-thread-view.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-16 16:16:43 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-16 16:16:43 -0600
commit41ae87e770f23ebe5ad02dbc68a497e0fb2f2a3d (patch)
tree0bba2afc4eaa19abe64fafeaf2e6ac50861cae15 /src/state/models/post-thread-view.ts
parentbd1a4b198e3682f96354d83f1e1efccf31813f82 (diff)
downloadvoidsky-41ae87e770f23ebe5ad02dbc68a497e0fb2f2a3d.tar.zst
Add post deletion
Diffstat (limited to 'src/state/models/post-thread-view.ts')
-rw-r--r--src/state/models/post-thread-view.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/state/models/post-thread-view.ts b/src/state/models/post-thread-view.ts
index 58fee1619..0334c8442 100644
--- a/src/state/models/post-thread-view.ts
+++ b/src/state/models/post-thread-view.ts
@@ -175,6 +175,13 @@ export class PostThreadViewPostModel implements GetPostThread.Post {
       })
     }
   }
+
+  async delete() {
+    await this.rootStore.api.app.bsky.feed.post.delete({
+      did: this.author.did,
+      rkey: new AtUri(this.uri).rkey,
+    })
+  }
 }
 
 export class PostThreadViewModel {