mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
contact-hook: no-op on accepted invite
The contact-hook was attempting to join a group upon it's invite being accepted. However, the join poke is also sent from the frontend, causing a potential race condition. Changes contact-hook to no-op on an %invite-update.
This commit is contained in:
parent
9ddb1c3a39
commit
516423b853
@ -164,10 +164,7 @@
|
||||
(fact-group-update:cc wire !<(update:group-store q.cage.sign))
|
||||
[cards this]
|
||||
::
|
||||
%invite-update
|
||||
=^ cards state
|
||||
(fact-invite-update:cc wire !<(invite-update q.cage.sign))
|
||||
[cards this]
|
||||
%invite-update [~ this]
|
||||
==
|
||||
==
|
||||
::
|
||||
@ -481,17 +478,6 @@
|
||||
[%pass / %agent [our.bol %invite-hook] %poke %invite-action !>(act)]
|
||||
--
|
||||
::
|
||||
++ fact-invite-update
|
||||
|= [wir=wire fact=invite-update]
|
||||
^- (quip card _state)
|
||||
?+ -.fact [~ state]
|
||||
%accepted
|
||||
=/ rid=resource
|
||||
(de-path:resource path.invite.fact)
|
||||
:_ state
|
||||
~[(contact-view-poke %join rid)]
|
||||
==
|
||||
::
|
||||
++ group-hook-poke
|
||||
|= =action:group-hook
|
||||
^- card
|
||||
|
Loading…
Reference in New Issue
Block a user