mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
Merge pull request #4286 from matrix-org/bwindels/picklastactivedmforverifreq
Fix: pick last active DM for verification request
This commit is contained in:
commit
491dad3669
1 changed files with 3 additions and 0 deletions
|
@ -174,6 +174,9 @@ export function findDMForUser(client, userId) {
|
|||
return member && (member.membership === "invite" || member.membership === "join");
|
||||
}
|
||||
return false;
|
||||
}).sort((r1, r2) => {
|
||||
return r2.getLastActiveTimestamp() -
|
||||
r1.getLastActiveTimestamp();
|
||||
});
|
||||
if (suitableDMRooms.length) {
|
||||
return suitableDMRooms[0];
|
||||
|
|
Loading…
Reference in a new issue