mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 14:42:02 +03:00
link-proxy-hook: fix incorrect scry paths
We were scrying for /gx/path instead of /gx/=link-store=/path. In the %annotations case, that path wasn't even correct. Also refactors scries out into a +scry-for helper.
This commit is contained in:
parent
5d01b4750b
commit
f2cf3d43d3
@ -114,13 +114,8 @@
|
||||
?& ?=(^ group)
|
||||
(~(has in u.group) who)
|
||||
==
|
||||
.^ (unit group:group-store)
|
||||
%gx
|
||||
(scot %p our.bowl)
|
||||
%group-store
|
||||
(scot %da now.bowl)
|
||||
(snoc u.target %noun)
|
||||
==
|
||||
%+ scry-for (unit group:group-store)
|
||||
[%group-store u.target]
|
||||
::
|
||||
:: groups subscription
|
||||
::TODO largely copied from link-listen-hook. maybe make a store-listener lib?
|
||||
@ -216,10 +211,14 @@
|
||||
[%give %fact ~ %link-initial !>(initial)]
|
||||
?+ path !!
|
||||
[%local-pages ^]
|
||||
[%local-pages .^((map ^path pages) %gx path)]
|
||||
:- %local-pages
|
||||
%+ scry-for (map ^path pages)
|
||||
[%link-store path]
|
||||
::
|
||||
[%annotations ~ ^]
|
||||
[%annotations .^((per-path-url notes) %gx '' t.t.path)]
|
||||
[%annotations %$ ^]
|
||||
:- %annotations
|
||||
%+ scry-for (per-path-url notes)
|
||||
[%link-store path]
|
||||
==
|
||||
::
|
||||
++ start-proxy
|
||||
@ -249,4 +248,14 @@
|
||||
:: else, close the local subscription.
|
||||
::
|
||||
[(proxy-pass-link-store path %leave ~)]~
|
||||
::
|
||||
++ scry-for
|
||||
|* [=mold app=term =path]
|
||||
.^ mold
|
||||
%gx
|
||||
(scot %p our.bowl)
|
||||
app
|
||||
(scot %da now.bowl)
|
||||
(snoc `^path`path %noun)
|
||||
==
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user