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

pull/21833/head
Johannes Krude 2022-02-18 09:43:19 +01:00 committed by GitHub
parent 08a0c6f86c
commit 32e127e098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -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");
@ -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);
@ -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') {