1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Implement button to remove a room from a group

NB: This doesn't provide any feedback to the user. We should use a GroupSummaryStore-style component to refresh the view after a successful hit to the API. This could affect the summary view as well, because when rooms are removed from a group, they are also removed from the summary (if necessary).
This commit is contained in:
Luke Barnard
2017-09-29 17:59:24 +01:00
parent 0a53630806
commit 955ca6cd2b
2 changed files with 12 additions and 2 deletions

View File

@@ -24,8 +24,7 @@ export const GroupMemberType = PropTypes.shape({
export const GroupRoomType = PropTypes.shape({
name: PropTypes.string,
// TODO: API doesn't return this yet
// roomId: PropTypes.string.isRequired,
roomId: PropTypes.string.isRequired,
canonicalAlias: PropTypes.string,
avatarUrl: PropTypes.string,
});
@@ -41,6 +40,7 @@ export function groupMemberFromApiObject(apiObject) {
export function groupRoomFromApiObject(apiObject) {
return {
name: apiObject.name,
roomId: apiObject.room_id,
canonicalAlias: apiObject.canonical_alias,
avatarUrl: apiObject.avatar_url,
};