mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-18 10:51:54 +02:00
Use correct 1-1 room avatar after users leave
The correct 1-1 avatar is used with rooms in which there are only two users with either "join" or "invite" as their membership (importantly, not "leave" or otherwise). (This is important when a user moves accounts and re-joins previously left 1-1 chats)
This commit is contained in:
parent
70c7facb6f
commit
10017522e2
@ -86,7 +86,7 @@ module.exports = React.createClass({
|
|||||||
var userIds = [];
|
var userIds = [];
|
||||||
// for .. in optimisation to return early if there are >2 keys
|
// for .. in optimisation to return early if there are >2 keys
|
||||||
for (var uid in mlist) {
|
for (var uid in mlist) {
|
||||||
if (mlist.hasOwnProperty(uid)) {
|
if (mlist.hasOwnProperty(uid) && ["join", "invite"].includes(mlist[uid].membership)) {
|
||||||
userIds.push(uid);
|
userIds.push(uid);
|
||||||
}
|
}
|
||||||
if (userIds.length > 2) {
|
if (userIds.length > 2) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user