Skip to content

Commit

Permalink
Merge pull request #3948 from tloncorp/hm/leave-channels-properly
Browse files Browse the repository at this point in the history
groups: make sure we leave channels in all cases of leaving a group
  • Loading branch information
arthyn authored Sep 25, 2024
2 parents 138f595 + a09ac53 commit 4f67d63
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions desk/app/groups.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
=+ !<(=flag:g vase)
?> from-self
?< =(our.bowl p.flag)
go-abet:go-leave:(go-abed:group-core flag)
go-abet:(go-leave:(go-abed:group-core flag) &)
::
%group-create
?> from-self
Expand Down Expand Up @@ -1031,17 +1031,16 @@
--
::
++ go-leave
=/ joined-channels
%- ~(gas in *(set nest:g))
%+ murn ~(tap in channels.group)
|= [ch=nest:g =channel:g]
[~ ch]
|= send-remove=?
=/ joined-channels ~(tap in ~(key by channels.group))
=. cor
(emil (leave-channels:go-pass ~(tap in joined-channels)))
(emil (leave-channels:go-pass joined-channels))
=. cor
(submit-activity [%del %group flag])
=. cor (emit remove-self:go-pass)
=. cor (emit %give %fact ~[/groups /groups/ui] group-leave+!>(flag))
=? cor send-remove
(emit remove-self:go-pass)
=. cor
(emit %give %fact ~[/groups /groups/ui] group-leave+!>(flag))
go-core(gone &)
::
++ go-init
Expand Down Expand Up @@ -1392,7 +1391,7 @@
%zone (go-zone-update +.diff)
%meta (go-meta-update p.diff)
%secret (go-secret-update p.diff)
%del go-core(gone &)
%del (go-leave |)
%flag-content (go-flag-content +:diff)
==
::
Expand Down Expand Up @@ -1778,7 +1777,7 @@
=. go-core (go-activity %kick i.ships)
$(ships t.ships)
?: (~(has in ships) our.bowl)
go-core(gone &)
(go-leave |)
go-core
::
%add-sects
Expand Down

0 comments on commit 4f67d63

Please sign in to comment.