Implement deep-linking for threads (matrix.to) (#7003)

This commit is contained in:
Germain 2021-10-22 09:30:36 +01:00 committed by GitHub
parent bc32f05fcb
commit e20ac7bf1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 122 additions and 12 deletions

View file

@ -19,12 +19,18 @@ import { Action } from "../actions";
import dis from '../dispatcher';
import { SetRightPanelPhasePayload } from "../payloads/SetRightPanelPhasePayload";
export const dispatchShowThreadEvent = (event: MatrixEvent) => {
export const dispatchShowThreadEvent = (
rootEvent: MatrixEvent,
initialEvent?: MatrixEvent,
highlighted?: boolean,
) => {
dis.dispatch({
action: Action.SetRightPanelPhase,
phase: RightPanelPhases.ThreadView,
refireParams: {
event,
event: rootEvent,
initialEvent,
highlighted,
},
});
};