Right panel: view third party invite info without clearing history (#11934)

* add View3pidInvite to actions enum, replace uses

* extract out action handler

* push card instead, test

* comment
This commit is contained in:
Kerry 2023-11-28 11:30:57 +13:00 committed by GitHub
parent fbd64d37f2
commit 0bbb9e8c89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 124 additions and 10 deletions

View file

@ -131,6 +131,7 @@ import { isNotUndefined } from "../../Typeguards";
import { CancelAskToJoinPayload } from "../../dispatcher/payloads/CancelAskToJoinPayload";
import { SubmitAskToJoinPayload } from "../../dispatcher/payloads/SubmitAskToJoinPayload";
import RightPanelStore from "../../stores/right-panel/RightPanelStore";
import { onView3pidInvite } from "../../stores/right-panel/action-handlers";
const DEBUG = false;
const PREVENT_MULTIPLE_JITSI_WITHIN = 30_000;
@ -1272,14 +1273,8 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
RightPanelStore.instance.showOrHidePanel(RightPanelPhases.RoomMemberList);
}
break;
case "view_3pid_invite":
if (payload.event) {
RightPanelStore.instance.showOrHidePanel(RightPanelPhases.Room3pidMemberInfo, {
memberInfoEvent: payload.event,
});
} else {
RightPanelStore.instance.showOrHidePanel(RightPanelPhases.RoomMemberList);
}
case Action.View3pidInvite:
onView3pidInvite(payload, RightPanelStore.instance);
break;
}
};