mirror of https://github.com/vector-im/riot-web
extract buildRecents return type into an interface
parent
60d161caf5
commit
eef15394f2
|
@ -53,6 +53,12 @@ import AccessibleButton from '../elements/AccessibleButton';
|
||||||
// we have a number of types defined from the Matrix spec which can't reasonably be altered here.
|
// we have a number of types defined from the Matrix spec which can't reasonably be altered here.
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
|
|
||||||
|
interface IRecentUser {
|
||||||
|
userId: string,
|
||||||
|
user: RoomMember,
|
||||||
|
lastActive: number,
|
||||||
|
}
|
||||||
|
|
||||||
export const KIND_DM = "dm";
|
export const KIND_DM = "dm";
|
||||||
export const KIND_INVITE = "invite";
|
export const KIND_INVITE = "invite";
|
||||||
export const KIND_CALL_TRANSFER = "call_transfer";
|
export const KIND_CALL_TRANSFER = "call_transfer";
|
||||||
|
@ -402,11 +408,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
||||||
this.setState({consultFirst: ev.target.checked});
|
this.setState({consultFirst: ev.target.checked});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static buildRecents(excludedTargetIds: Set<string>): {
|
public static buildRecents(excludedTargetIds: Set<string>): IRecentUser[] {
|
||||||
userId: string,
|
|
||||||
user: RoomMember,
|
|
||||||
lastActive: number,
|
|
||||||
}[] {
|
|
||||||
const rooms = DMRoomMap.shared().getUniqueRoomsWithIndividuals(); // map of userId => js-sdk Room
|
const rooms = DMRoomMap.shared().getUniqueRoomsWithIndividuals(); // map of userId => js-sdk Room
|
||||||
|
|
||||||
// Also pull in all the rooms tagged as DefaultTagID.DM so we don't miss anything. Sometimes the
|
// Also pull in all the rooms tagged as DefaultTagID.DM so we don't miss anything. Sometimes the
|
||||||
|
|
Loading…
Reference in New Issue