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:
Liam Fitzgerald 2020-08-17 12:41:24 +10:00
parent 9ddb1c3a39
commit 516423b853

View File

@ -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