diff --git a/ape/work.hoon b/ape/work.hoon index a403cea8f..45818f9ee 100644 --- a/ape/work.hoon +++ b/ape/work.hoon @@ -40,7 +40,7 @@ :_ ~ ^- move :* ost %poke - /sending/(scot %uw id)/(scot %ud version) + /sending/(scot %uv id)/(scot %ud version) [our %talk] %talk-command ^- command:talk @@ -61,7 +61,7 @@ :_ ~ ^- move :* ost %poke - /claiming/(scot %uw id) + /claiming/(scot %uv id) [our %talk] %talk-command ^- command:talk @@ -121,24 +121,40 @@ ^- [mos=(list move) con=_+>.$] ?- -.action %create :: XX should verify ownership - =+ existing-task=(~(get by tasks) id.p.action) + =+ existing-task=(~(get by tasks) id.tax.action) ~? ?& ?=(^ existing-task) - !=(p.action task.u.existing-task) + !=(tax.action task.u.existing-task) == :* %new-task-with-old-id her=her from=from - new-task=p.action + new-task=tax.action existing-task=u.existing-task == + ?. |(=(her owner.tax.action) =(%released status.tax.action)) + ~& :* %created-with-bad-owner + her=her + from=from + new-task=tax.action + existing-task=u.existing-task + == + [~ +>.$] =. tasks - %^ ~(put by tasks) id.p.action p.action + %^ ~(put by tasks) id.tax.action tax.action ?~ existing-task from (~(uni in audience.u.existing-task) from) - =. sort ?~(existing-task sort [id.p.action sort]) + =. sort ?~(existing-task sort [id.action sort]) [~ +>.$] :: %claim + =+ tax=(~(got by tasks) id.action) + ?. &(=(our owner.tax) =(%announced status.tax)) + ~& :* %bad-claim + her=her + from=from + task=tax + == + [~ +>.$] abet:(release:(at (~(got by tasks) id.action)) her) :: %update diff --git a/sur/talk.hoon b/sur/talk.hoon index 32d825b24..cd63463b1 100644 --- a/sur/talk.hoon +++ b/sur/talk.hoon @@ -81,7 +81,7 @@ ++ work-stuff :: |% :: ++ duty :: - $% [%create p=task] :: create new task + $% [%create tax=task] :: create new task [%claim id=@uvH] :: claim task $: %update :: operate on task id=@uvH :: which task