Group Chat Info: Fix invalid admin badge when loading members (#2373)
This commit is contained in:
parent
730f74f301
commit
f772abd6c7
@ -255,11 +255,13 @@ export function addChatMembers<T extends GlobalState>(global: T, chat: ApiChat,
|
|||||||
return global;
|
return global;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const adminMembers = updatedMembers.filter(({ isAdmin, isOwner }) => isAdmin || isOwner);
|
||||||
|
|
||||||
return updateChat(global, chat.id, {
|
return updateChat(global, chat.id, {
|
||||||
fullInfo: {
|
fullInfo: {
|
||||||
...chat.fullInfo,
|
...chat.fullInfo,
|
||||||
members: updatedMembers,
|
members: updatedMembers,
|
||||||
adminMembersById: buildCollectionByKey(updatedMembers, 'userId'),
|
adminMembersById: buildCollectionByKey(adminMembers, 'userId'),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user