Merge pull request #4400 from urbit/lf/con-hook-loop

contact-hooks: prevent infinite hook loop
This commit is contained in:
Liam Fitzgerald 2021-02-09 13:40:12 +10:00 committed by GitHub
commit ac026ea370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -46,6 +46,7 @@
=/ =share !<(share vase) =/ =share !<(share vase)
:_ this :_ ~ :_ this :_ ~
?: =(our.bowl src.bowl) ?: =(our.bowl src.bowl)
?< =(ship.share our.bowl)
:: proxy poke :: proxy poke
%+ poke:pass:io [ship.share dap.bowl] %+ poke:pass:io [ship.share dap.bowl]
contact-share+!>([%share our.bowl]) contact-share+!>([%share our.bowl])

View File

@ -101,7 +101,9 @@ export const ShareProfile = (props) => {
} else if (!group.hidden) { } else if (!group.hidden) {
const [,,ship,name] = groupPath.split('/'); const [,,ship,name] = groupPath.split('/');
await api.contacts.allowGroup(ship,name); await api.contacts.allowGroup(ship,name);
if(ship !== `~${window.ship}`) {
await api.contacts.share(ship); await api.contacts.share(ship);
}
setShowBanner(false); setShowBanner(false);
} }
}; };