update groupchat pokes to take a list of invitees

This commit is contained in:
hanfel-dovned 2024-06-11 13:48:17 -07:00
parent a9724601e9
commit 78577c8675
5 changed files with 35 additions and 24 deletions

View File

@ -108,7 +108,7 @@
;span.hidden: no dms
?: (lte 3 (lent pith))
;h1.hidden: {<pith>}
=/ ship +:;;([%p @p] `(list iota)`(rear pith))
=/ ship +:;;([%p @p] (rear pith))
^- manx
;a.br1.hover.b0.fr.jb.wf.border
=href "/neo/hawk{(pith-tape here.bowl)}{(pith-tape pith)}"

View File

@ -8,21 +8,21 @@
=/ head (@tas (got:mu %head))
~& >>> head
%- messenger-diff
?+ head
?+ head
~| [%unknown-head head]
!!
%new-dm
=/ partner `@p`(slav %p (vol:mu "partner"))
[head partner]
::
=/ partner `@p`(slav %p (vol:mu "partner"))
[head partner]
::
%new-groupchat
=/ name (vol:mu "name")
[head name]
::
=/ name (vol:mu "name")
[head name ~]
::
%invite-to-groupchat
~& > (vol:mu "name")
=/ name (vol:mu "name")
=/ ship `@p`(slav %p (vol:mu "ship"))
~& >>> [head name ship]
[head name ship]
~& > (vol:mu "name")
=/ name (vol:mu "name")
::=/ ship `@p`(slav %p (vol:mu "ship"))
::~& >>> [head name ship]
[head name ~]
==

View File

@ -21,7 +21,6 @@
^- (quip card:neo pail:neo)
:: default case: make new groupchat with self as only member,
:: and subscribe to that publisher
:: XX - maybe move ordering is unpredictable here
?~ old
:_ :- %groupchat
!>([(sy our.bowl ~) ~ here.bowl])

View File

@ -2,6 +2,19 @@
/@ groupchat-diff
/@ messenger-diff
^- kook:neo
=>
|%
++ send-invites
|= [invites=(set ship) location=pith]
%+ turn
~(tap in invites)
|= =ship
:- location
=/ provider ~[p/ship %home %messenger]
~& provider
[%poke groupchat-diff/!>([%invite ship provider])]
--
::
|%
++ state pro/%sig
++ poke (sy %dm-diff %groupchat-diff %messenger-diff ~)
@ -58,18 +71,17 @@
==
::
%new-groupchat
=/ location
(welp here.bowl ~[%groupchats p/our.bowl t/name.poke])
:_ state
:~ :- (welp here.bowl ~[%groupchats p/our.bowl t/name.poke])
[%make %groupchat ~ ~]
==
:- [location [%make %groupchat ~ ~]]
(send-invites invites.poke location)
::
%invite-to-groupchat
=/ provider ~[p/ship.poke %home %messenger]
~& provider
=/ location
(welp here.bowl ~[%groupchats p/our.bowl t/name.poke])
:_ state
:~ :- (welp here.bowl ~[%groupchats p/our.bowl t/name.poke])
[%poke groupchat-diff/!>([%invite ship.poke provider])]
==
(send-invites invites.poke location)
==
==
--

View File

@ -1,4 +1,4 @@
$% [%new-dm partner=ship]
[%new-groupchat name=@t]
[%invite-to-groupchat name=@t =ship]
[%new-groupchat name=@t invites=(set ship)]
[%invite-to-groupchat name=@t invites=(set ship)]
==