Fix the type for SetRightPanelPhasePayload

Fix uses of it as well
This commit is contained in:
Swapnil Raj 2020-07-29 16:59:29 +05:30
parent 5ea7be5d53
commit bf450ad075
3 changed files with 4 additions and 4 deletions

View file

@ -50,7 +50,7 @@ export default class GroupHeaderButtons extends HeaderButtons {
if (payload.action === Action.ViewUser) {
if ((payload as ViewUserPayload).member) {
this.setPhase(RightPanelPhases.RoomMemberInfo, {members: payload.member});
this.setPhase(RightPanelPhases.RoomMemberInfo, {member: payload.member});
} else {
this.setPhase(RightPanelPhases.GroupMemberList);
}
@ -66,7 +66,7 @@ export default class GroupHeaderButtons extends HeaderButtons {
} else if (payload.action === "view_group_member_list") {
this.setPhase(RightPanelPhases.GroupMemberList);
} else if (payload.action === "view_group_user") {
this.setPhase(RightPanelPhases.GroupMemberInfo, {members: payload.member});
this.setPhase(RightPanelPhases.GroupMemberInfo, {member: payload.member});
}
}

View file

@ -45,7 +45,7 @@ export default class RoomHeaderButtons extends HeaderButtons {
super.onAction(payload);
if (payload.action === Action.ViewUser) {
if (payload.member) {
this.setPhase(RightPanelPhases.RoomMemberInfo, {members: payload.member});
this.setPhase(RightPanelPhases.RoomMemberInfo, {member: payload.member});
} else {
this.setPhase(RightPanelPhases.RoomMemberList);
}

View file

@ -30,7 +30,7 @@ export interface SetRightPanelPhasePayload extends ActionPayload {
export interface SetRightPanelPhaseRefireParams {
// XXX: Fix after the types are defiend in matrix-js-sdk
// No appropriate types exist yet for the fields
members?: RoomMember;
member?: RoomMember;
verificationRequest?: typeof VerificationRequest;
groupId?: string;
groupRoomId?: string;