From a8ca5d9ffcf02507426a514f94b9c3ca2c189cb9 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Mon, 8 Mar 2021 13:10:04 +1000 Subject: [PATCH 1/2] Invites: accept already joined group Fixes urbit/landscape#503 --- pkg/interface/src/views/components/Invite/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/interface/src/views/components/Invite/index.tsx b/pkg/interface/src/views/components/Invite/index.tsx index 1ada18e65..a4cb747b9 100644 --- a/pkg/interface/src/views/components/Invite/index.tsx +++ b/pkg/interface/src/views/components/Invite/index.tsx @@ -44,6 +44,10 @@ export function InviteItem(props: InviteItemProps) { if (!(app && invite && uid)) { return; } + if(resource in props.groups) { + await api.invite.accept(app, uid); + return; + } api.groups.join(ship, name); await waiter(p => resource in p.pendingJoin); From 3007a7408f7229edf4561f6e5927441722ec7a5a Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Tue, 9 Mar 2021 11:26:37 +1000 Subject: [PATCH 2/2] Invites: decline if already joned --- pkg/interface/src/views/components/Invite/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/src/views/components/Invite/index.tsx b/pkg/interface/src/views/components/Invite/index.tsx index a4cb747b9..d57cdc1b8 100644 --- a/pkg/interface/src/views/components/Invite/index.tsx +++ b/pkg/interface/src/views/components/Invite/index.tsx @@ -45,7 +45,7 @@ export function InviteItem(props: InviteItemProps) { return; } if(resource in props.groups) { - await api.invite.accept(app, uid); + await api.invite.decline(app, uid); return; }