mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
Merge pull request #2427 from urbit/chat-invites
chat: only send invites for unmanaged chats
This commit is contained in:
commit
bc1adfa509
@ -482,7 +482,7 @@
|
||||
%+ turn ~(tap in who)
|
||||
|= =ship
|
||||
?: (is-permitted ship chat)
|
||||
?: ?|(=(kind %remove) =(ship our.bol)) ~
|
||||
?: ?|(=(kind %remove) =(ship our.bol) (is-managed pax)) ~
|
||||
:: if ship has just been added to the permitted group,
|
||||
:: send them an invite
|
||||
~[(send-invite chat ship)]
|
||||
@ -495,6 +495,12 @@
|
||||
=/ =invite [our.bol %chat-hook path ship '']
|
||||
=/ act=invite-action [%invite /chat (shaf %msg-uid eny.bol) invite]
|
||||
[%pass / %agent [our.bol %invite-hook] %poke %invite-action !>(act)]
|
||||
::
|
||||
++ is-managed
|
||||
|= =path
|
||||
^- ?
|
||||
?> ?=(^ path)
|
||||
!=(i.path '~')
|
||||
--
|
||||
::
|
||||
++ fact-chat-update
|
||||
|
@ -257,13 +257,7 @@
|
||||
++ create-group
|
||||
|= [=path app-path=path sec=rw-security ships=(set ship) title=@t desc=@t]
|
||||
^- (list card)
|
||||
=/ group (group-scry path)
|
||||
?^ group
|
||||
%- zing
|
||||
%+ turn ~(tap in u.group)
|
||||
|= =ship
|
||||
?: =(ship our.bol) ~
|
||||
[(send-invite app-path ship)]~
|
||||
?^ (group-scry path) ~
|
||||
:: do not create a managed group if this is a sig path or a blacklist
|
||||
::
|
||||
?: =(sec %channel)
|
||||
@ -273,11 +267,17 @@
|
||||
==
|
||||
?: (is-managed path)
|
||||
~[(contact-view-poke [%create path ships title desc])]
|
||||
:~ (group-poke [%bundle path])
|
||||
(group-poke [%add ships path])
|
||||
(create-security path sec)
|
||||
(permission-hook-poke [%add-owned path path])
|
||||
==
|
||||
%+ welp
|
||||
:~ (group-poke [%bundle path])
|
||||
(group-poke [%add ships path])
|
||||
(create-security path sec)
|
||||
(permission-hook-poke [%add-owned path path])
|
||||
==
|
||||
%- zing
|
||||
%+ turn ~(tap in ships)
|
||||
|= =ship
|
||||
?: =(ship our.bol) ~
|
||||
[(send-invite app-path ship)]~
|
||||
::
|
||||
++ create-security
|
||||
|= [pax=path sec=rw-security]
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user