mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-02 07:06:41 +03:00
NewChannel: redirect DM creation from DM routes
We were redirecting based on our parent path, so if we were in a DM while making a DM, we used that DM as our parent path. Fixes urbit/landscape#421
This commit is contained in:
parent
5db4c1307b
commit
6c2d935913
@ -100,7 +100,7 @@ export function NewChannel(props: NewChannelProps & RouteComponentProps) {
|
|||||||
await waiter(p => Boolean(p?.groups?.[`/ship/~${window.ship}/${resId}`]));
|
await waiter(p => Boolean(p?.groups?.[`/ship/~${window.ship}/${resId}`]));
|
||||||
}
|
}
|
||||||
actions.setStatus({ success: null });
|
actions.setStatus({ success: null });
|
||||||
const resourceUrl = parentPath(location.pathname);
|
const resourceUrl = (location.pathname.includes("/messages")) ? "/~landscape/messages" : parentPath(location.pathname);
|
||||||
history.push(
|
history.push(
|
||||||
`${resourceUrl}/resource/${moduleType}/ship/~${window.ship}/${resId}`
|
`${resourceUrl}/resource/${moduleType}/ship/~${window.ship}/${resId}`
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user