Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 2, 2024
2 parents 0d2fc04 + b9b6972 commit b6ca618
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
13 changes: 11 additions & 2 deletions desk/app/channels.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -1274,10 +1274,19 @@
[%posts rest=*] (ca-peek-posts rest.pole)
[%perm ~] ``channel-perm+!>(perm.perm.channel)
[%hark %rope post=@ ~]
``noun+!>((ca-rope kind.nest (slav %ud post.pole) ~))
=/ id (slav %ud post.pole)
:^ ~ ~ %noun !>
?. (has:on-v-posts:c posts.channel id) ~
`(ca-rope kind.nest id ~)
[%hark %rope post=@ reply=@ ~]
=/ post-id (slav %ud post.pole)
=/ reply-id (slav %ud reply.pole)
:^ ~ ~ %noun !>
(ca-rope kind.nest (slav %ud post.pole) `(slav %ud reply.pole))
=/ post (get:on-v-posts:c posts.channel post-id)
?~ post ~
?~ u.post ~
?. (has:on-v-replies:c replies.u.u.post reply-id) ~
`(ca-rope kind.nest post-id `reply-id)
[%search %text skip=@ count=@ nedl=@ ~]
:^ ~ ~ %channel-scan !>
%^ text:ca-search
Expand Down
12 changes: 7 additions & 5 deletions desk/app/groups.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -902,14 +902,15 @@
::
++ get-channel-rope
|= [=nest:g =id-post:d id-reply=(unit id-reply:d)]
^- rope:ha
^- (unit rope:ha)
=/ prefix (channel-scry nest)
?. .^(has=? %gu prefix) ~
=/ ch-path=path
?~ id-reply
(welp prefix /hark/rope/(scot %ud id-post))
(welp prefix /hark/rope/(scot %ud id-post)/(scot %ud u.id-reply))
=/ =path (snoc ch-path %noun)
.^(rope:ha %gx path)
.^((unit rope:ha) %gx path)
::
++ group-core
|_ [=flag:g =net:g =group:g gone=_|]
Expand Down Expand Up @@ -1398,12 +1399,13 @@
(~(put in u.flaggers) src)
=. flagged-content.group (~(put by flagged-content.group) nest channel-flagged)
?: |(from-self !go-is-our-bloc) go-core
=/ =rope:ha (get-channel-rope nest post-key)
=/ rope=(unit rope:ha) (get-channel-rope nest post-key)
?~ rope go-core
=/ link
(welp /groups/(scot %p p.flag)/[q.flag]/channels ted.rope)
(welp /groups/(scot %p p.flag)/[q.flag]/channels ted.u.rope)
=/ =new-yarn:ha
%- spin
:* rope
:* u.rope
link
`['See post' link]
:~ [%ship src]
Expand Down

0 comments on commit b6ca618

Please sign in to comment.