Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add #/dm command to be used as a link in custom home.html (#7783)
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-krude authored Feb 18, 2022
1 parent 08a0c6f commit 32e127e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/structures/MatrixChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,9 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
}
case 'view_create_room':
this.createRoom(payload.public, payload.defaultName);

// View the welcome or home page if we need something to look at
this.viewSomethingBehindModal();
break;
case 'view_create_group': {
const prototype = SettingsStore.getValue("feature_communities_v2_prototypes");
Expand Down Expand Up @@ -710,6 +713,9 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
break;
case 'view_create_chat':
showStartChatInviteDialog(payload.initialText || "");

// View the welcome or home page if we need something to look at
this.viewSomethingBehindModal();
break;
case 'view_invite': {
const room = MatrixClientPeg.get().getRoom(payload.roomId);
Expand Down Expand Up @@ -1696,6 +1702,10 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
dis.dispatch({
action: 'view_create_room',
});
} else if (screen === 'dm') {
dis.dispatch({
action: 'view_create_chat',
});
} else if (screen === 'settings') {
dis.fire(Action.ViewUserSettings);
} else if (screen === 'welcome') {
Expand Down

0 comments on commit 32e127e

Please sign in to comment.