mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 04:58:08 +03:00
update groupchat pokes to take a list of invitees
This commit is contained in:
parent
a9724601e9
commit
78577c8675
@ -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)}"
|
||||
|
@ -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 ~]
|
||||
==
|
@ -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])
|
||||
|
@ -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)
|
||||
==
|
||||
==
|
||||
--
|
||||
|
@ -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)]
|
||||
==
|
Loading…
Reference in New Issue
Block a user