mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-15 18:21:38 +03: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
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ module.exports = React.createClass({
|
|||
var userIds = [];
|
||||
// for .. in optimisation to return early if there are >2 keys
|
||||
for (var uid in mlist) {
|
||||
if (mlist.hasOwnProperty(uid)) {
|
||||
if (mlist.hasOwnProperty(uid) && ["join", "invite"].includes(mlist[uid].membership)) {
|
||||
userIds.push(uid);
|
||||
}
|
||||
if (userIds.length > 2) {
|
||||
|
|
Loading…
Reference in a new issue