mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-28 09:27:39 +03:00
bf023ff874
This fixes "ghost groups" if you leave a group soon after joining
44 lines
1.0 KiB
Plaintext
44 lines
1.0 KiB
Plaintext
/- spider,
|
|
metadata=metadata-store,
|
|
*group,
|
|
inv=invite-store,
|
|
store=group-store,
|
|
pull-hook
|
|
/+ strandio, resource, view=group-view
|
|
=>
|
|
|%
|
|
++ strand strand:spider
|
|
++ poke poke:strandio
|
|
++ raw-poke-our raw-poke-our:strandio
|
|
--
|
|
^- thread:spider
|
|
|= arg=vase
|
|
=/ m (strand ,vase)
|
|
=+ !<([~ =action:view] arg)
|
|
?> ?=(%leave -.action)
|
|
;< =bowl:spider bind:m get-bowl:strandio
|
|
=* rid resource.action
|
|
=/ pull-hook-act=cage
|
|
:- %pull-hook-action
|
|
!> ^- action:pull-hook
|
|
[%remove rid]
|
|
=/ leave=cage
|
|
:- %group-update-0
|
|
!> ^- update:store
|
|
[%remove-members rid (silt our.bowl ~)]
|
|
=/ remove=cage
|
|
:- %group-update-0
|
|
!> ^- update:store
|
|
[%remove-group rid ~]
|
|
;< ~ bind:m
|
|
(raw-poke-our %group-push-hook leave)
|
|
;< ~ bind:m
|
|
(raw-poke-our %group-pull-hook pull-hook-act)
|
|
;< ~ bind:m
|
|
(raw-poke-our %contact-pull-hook pull-hook-act)
|
|
;< ~ bind:m
|
|
(raw-poke-our %group-store remove)
|
|
;< ~ bind:m
|
|
(raw-poke-our %group-view group-view-action+!>([%done rid]))
|
|
(pure:m !>(~))
|