From 7dde91c8c9f0e2f475b9641c7b31b19a4d9585cc Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Tue, 9 Feb 2021 13:21:15 +1000 Subject: [PATCH 1/2] contact-push-hook: prevent share loop --- pkg/arvo/app/contact-push-hook.hoon | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/arvo/app/contact-push-hook.hoon b/pkg/arvo/app/contact-push-hook.hoon index 32b2208204..165132ad46 100644 --- a/pkg/arvo/app/contact-push-hook.hoon +++ b/pkg/arvo/app/contact-push-hook.hoon @@ -46,6 +46,7 @@ =/ =share !<(share vase) :_ this :_ ~ ?: =(our.bowl src.bowl) + ?< =(ship.share our.bowl) :: proxy poke %+ poke:pass:io [ship.share dap.bowl] contact-share+!>([%share our.bowl]) From bc5e32491c8c908cec95a446393eb9d373369ea0 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Tue, 9 Feb 2021 13:21:49 +1000 Subject: [PATCH 2/2] ShareProfile: only share if we arent recipient --- pkg/interface/src/views/apps/chat/components/ShareProfile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/interface/src/views/apps/chat/components/ShareProfile.js b/pkg/interface/src/views/apps/chat/components/ShareProfile.js index 6356df8d9a..8e6ba5ff0d 100644 --- a/pkg/interface/src/views/apps/chat/components/ShareProfile.js +++ b/pkg/interface/src/views/apps/chat/components/ShareProfile.js @@ -101,7 +101,9 @@ export const ShareProfile = (props) => { } else if (!group.hidden) { const [,,ship,name] = groupPath.split('/'); await api.contacts.allowGroup(ship,name); - await api.contacts.share(ship); + if(ship !== `~${window.ship}`) { + await api.contacts.share(ship); + } setShowBanner(false); } };