From 5db4c1307bf40d0ef98fe4414f3336eccc4303b4 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 12 Feb 2021 14:30:24 -0500 Subject: [PATCH] invites: redirect multiple member DMs to messages --- pkg/interface/src/views/components/Invite/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/components/Invite/index.tsx b/pkg/interface/src/views/components/Invite/index.tsx index fc6e9b192..c39c1d5e8 100644 --- a/pkg/interface/src/views/components/Invite/index.tsx +++ b/pkg/interface/src/views/components/Invite/index.tsx @@ -61,7 +61,7 @@ export function InviteItem(props: InviteItemProps) { if (props.groups?.[resource]?.hidden) { const { metadata } = associations.graph[resource]; - if (name.startsWith("dm--")) { + if (metadata?.module === 'chat') { history.push(`/~landscape/messages/resource/${metadata.module}${resource}`); } else { history.push(`/~landscape/home/resource/${metadata.module}${resource}`); @@ -126,7 +126,7 @@ export function InviteItem(props: InviteItemProps) { You are joining a DM with - {cite("~hastuc-dibtux")} + {cite(`~${invite!.ship}`)}