Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groups: make sure we leave channels in all cases of leaving a group #3948

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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