Wire up members button to member view
Ideally this would open up the group members panel, but that's exceedingly difficult. Instead, we switch to the general chat and rename the button to be a bit more helpful.
This commit is contained in:
parent
281e2ab27b
commit
93d67a6689
6 changed files with 52 additions and 11 deletions
|
@ -67,15 +67,7 @@ export function showCommunityRoomInviteDialog(roomId, communityName) {
|
|||
}
|
||||
|
||||
export function showCommunityInviteDialog(communityId) {
|
||||
const rooms = GroupStore.getGroupRooms(communityId)
|
||||
.map(r => MatrixClientPeg.get().getRoom(r.roomId))
|
||||
.filter(r => !!r);
|
||||
let chat = rooms.find(r => {
|
||||
const idState = r.currentState.getStateEvents("im.vector.general_chat", "");
|
||||
if (!idState || idState.getContent()['groupId'] !== communityId) return false;
|
||||
return true;
|
||||
});
|
||||
if (!chat) chat = rooms[0];
|
||||
const chat = CommunityPrototypeStore.instance.getGeneralChat(communityId);
|
||||
if (chat) {
|
||||
const name = CommunityPrototypeStore.instance.getCommunityName(communityId);
|
||||
showCommunityRoomInviteDialog(chat.roomId, name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue