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

Add #/dm command to be used as a link in custom home.html #7783

Merged
merged 2 commits into from
Feb 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/components/structures/MatrixChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,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 @@ -714,6 +717,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 @@ -1707,6 +1713,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