Skip to content

Commit

Permalink
Merge pull request #3641 from tloncorp/hm/add-club-invites
Browse files Browse the repository at this point in the history
chat: add club invites
  • Loading branch information
arthyn authored Jun 20, 2024
2 parents 4508ab2 + 3046709 commit 9cb26c7
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions desk/app/chat.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,7 @@
cu-core
::
%init
=. cor (pass-activity [%club id] [%invite ~] *story:d |)
:: ignore if already initialized
?: ?| !=(~ hive.crew.club)
!=(~ team.crew.club)
Expand Down Expand Up @@ -1586,12 +1587,17 @@
::
++ di-abed-soft
|= s=@p
=/ d
%+ ~(gut by dms) s
=| =remark:c
=. watching.remark &
[*pact:c remark ?:(=(src our):bowl %inviting %invited) |]
di-core(ship s, dm d)
=/ dm (~(get by dms) s)
?^ dm di-core(ship s, dm u.dm)
=| =remark:c
=/ new=dm:c
:* *pact:c
remark(watching &)
?:(=(src our):bowl %inviting %invited)
|
==
=. di-core di-core(ship s, dm new)
(di-activity [%invite ~] *story:d &)
::
++ di-area `path`/dm/(scot %p ship)
++ di-area-writs `path`/dm/(scot %p ship)/writs
Expand Down Expand Up @@ -1639,8 +1645,6 @@
=. pact.dm (reduce:di-pact now.bowl diff)
=? cor &(=(net.dm %invited) !=(ship our.bowl))
(give-invites ship)
=? di-core &(=(net.dm %invited) !=(ship our.bowl))
(di-activity [%invite ~] *story:d &)
?- -.q.diff
?(%del %add-react %del-react) (di-give-writs-diff diff)
::
Expand Down Expand Up @@ -1723,7 +1727,6 @@
=? cor =(our src):bowl
(emit (proxy-rsvp:di-pass ok))
?> |(=(src.bowl ship) =(our src):bowl)
=. cor (pass-activity [%ship ship] [%invite ~] *story:d |)
:: TODO hook into archive
?. ok
%- (note:wood %odd leaf/"gone {<ship>}" ~)
Expand Down

0 comments on commit 9cb26c7

Please sign in to comment.