diff --git a/pkg/arvo/app/chat-cli.hoon b/pkg/arvo/app/chat-cli.hoon index c17e159496..62c9f4c9c6 100644 --- a/pkg/arvo/app/chat-cli.hoon +++ b/pkg/arvo/app/chat-cli.hoon @@ -894,15 +894,13 @@ =/ =uid:post (snag index history) =/ =node:graph (got-node:libgraph uid) =. audience resource.uid - ?- -.post.node - %| [~ state] - %& - :_ put-ses - ^- (list card) - :~ (print:sh-out ['?' ' ' number]) - (effect:sh-out ~(render-activate mr resource.uid p.post.node)) - prompt:sh-out - == + ?: ?=(%| -.post.node) + [~ state] + :_ put-ses + ^- (list card) + :~ (print:sh-out ['?' ' ' number]) + (effect:sh-out ~(render-activate mr resource.uid p.post.node)) + prompt:sh-out == -- :: +chats: display list of joined chats diff --git a/pkg/arvo/app/graph-push-hook.hoon b/pkg/arvo/app/graph-push-hook.hoon index cb6cc2de94..ff4d0da93b 100644 --- a/pkg/arvo/app/graph-push-hook.hoon +++ b/pkg/arvo/app/graph-push-hook.hoon @@ -300,29 +300,25 @@ =/ parent-index=index:store (scag (dec (lent index)) index) ?: (~(has by nodes) parent-index) %.y - ?- -.post.node - %| %.n - :: - %& - ?. =(author.p.post.node src.bowl) - %.n - =/ =permissions:store - %^ add-mark resource vip - (node-to-indexed-post node) - =/ =permission-level:store - (get-permission permissions is-admin writers) - ?- permission-level - %yes %.y - %no %.n - :: - %self - =/ parent-node=node:store - (got-node:gra resource parent-index) - ?- -.post.parent-node - %| %.n - %& =(author.p.post.parent-node src.bowl) - == - == + ?: ?=(%| -.post.node) + %.n + ?. =(author.p.post.node src.bowl) + %.n + =/ =permissions:store + %^ add-mark resource vip + (node-to-indexed-post node) + =/ =permission-level:store + (get-permission permissions is-admin writers) + ?- permission-level + %yes %.y + %no %.n + :: + %self + =/ parent-node=node:store + (got-node:gra resource parent-index) + ?: ?=(%| -.post.parent-node) + %.n + =(author.p.post.parent-node src.bowl) == :: ++ is-allowed-remove @@ -337,20 +333,16 @@ ^- ? =/ =node:store (got-node:gra resource index) - ?- -.post.node - %| %.n - :: - %& - =/ =permissions:store - %^ remove-mark resource vip - (node-to-indexed-post node) - =/ =permission-level:store - (get-permission permissions is-admin writers) - ?- permission-level - %yes %.y - %no %.n - %self =(author.p.post.node src.bowl) - == + ?: ?=(%| -.post.node) %.n + =/ =permissions:store + %^ remove-mark resource vip + (node-to-indexed-post node) + =/ =permission-level:store + (get-permission permissions is-admin writers) + ?- permission-level + %yes %.y + %no %.n + %self =(author.p.post.node src.bowl) == :: ++ build-permissions diff --git a/pkg/arvo/app/graph-store.hoon b/pkg/arvo/app/graph-store.hoon index 99ff3e7a2a..99bb75b5f8 100644 --- a/pkg/arvo/app/graph-store.hoon +++ b/pkg/arvo/app/graph-store.hoon @@ -368,11 +368,11 @@ =/ =node:store ~| "cannot remove index that does not exist {}" (need (get:orm graph atom)) - ~| "cannot remove post that has already been removed" - ?> ?=(%& -.post.node) - =* p p.post.node - %= node + %_ node post + ~| "cannot remove post that has already been removed" + ?> ?=(%& -.post.node) + =* p p.post.node ^- maybe-post:store :- %| ?~ hash.p