chat-cli: Match store and hook's path handling

Now prefixes the host ship to the path, and parses it back out, only
when appropriate.
This commit is contained in:
Fang 2019-10-08 16:18:20 +02:00
parent 10b17ff127
commit 9c562f4c62
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -103,9 +103,7 @@
::
++ target-to-path
|= target
path
::TODO
:: [(scot %p ship) path]
[(scot %p ship) path]
:: +path-to-target: deduces a target from a mailbox path
::
++ path-to-target
@ -116,7 +114,7 @@
[our-self path]
=+ who=(slaw %p i.path)
?~ who [our-self path]
[u.who path]
[u.who t.path]
:: +poke-noun: debug helpers
::
++ poke-noun
@ -170,7 +168,7 @@
|= [=wire upd=chat-update]
^- (quip move _this)
?+ -.upd [~ this]
%create (notice-create (path-to-target path.upd))
%create (notice-create +.upd)
%delete [[(show-delete:sh-out (path-to-target path.upd)) ~] this]
%message (read-envelope (path-to-target path.upd) envelope.upd)
==