chat-view: send invites when creating chat and group already exists
:~ (create-chat app-path.act security.act allow-history.act)
%- create-group
:* group-path.act
+ app-path.act
security.act
members.act
title.act
==
::
++ create-group
- |= [=path security=rw-security ships=(set ship) title=@t desc=@t]
+ |= [=path app-path=path sec=rw-security ships=(set ship) title=@t desc=@t]
^- (list card)
- ?^ (group-scry path) ~
+ =/ group (group-scry path)
+ ?^ group
+ %- zing
+ %+ turn ~(tap in u.group)
+ |= =ship
+ ?: =(ship our.bol) ~
+ [(send-invite app-path ship)]~
:: do not create a managed group if this is a sig path or a blacklist
::
- ?: =(security %channel)
+ ?: =(sec %channel)
:~ (group-poke [%bundle path])
- (create-security path security)
+ (create-security path sec)
(permission-hook-poke [%add-owned path path])
==
?: (is-managed path)
~[(contact-view-poke [%create path ships title desc])]
:~ (group-poke [%bundle path])
(group-poke [%add ships path])
- (create-security path security)
+ (create-security path sec)
(permission-hook-poke [%add-owned path path])
==
::
!>(act)
==
::
- ++ send-invite-poke
+ ++ send-invite
|= [=path =ship]
^- card
=/ =invite
