You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Implement simple GroupRoomInfo
which replaces the "X" on the GroupRoomTile with "Remove from community" under Admin Tools.
This commit is contained in:
@@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
import { _t } from './languageHandler.js';
|
||||
|
||||
export const GroupMemberType = PropTypes.shape({
|
||||
userId: PropTypes.string.isRequired,
|
||||
@@ -23,6 +24,7 @@ export const GroupMemberType = PropTypes.shape({
|
||||
});
|
||||
|
||||
export const GroupRoomType = PropTypes.shape({
|
||||
displayname: PropTypes.string,
|
||||
name: PropTypes.string,
|
||||
roomId: PropTypes.string.isRequired,
|
||||
canonicalAlias: PropTypes.string,
|
||||
@@ -39,6 +41,7 @@ export function groupMemberFromApiObject(apiObject) {
|
||||
|
||||
export function groupRoomFromApiObject(apiObject) {
|
||||
return {
|
||||
displayname: apiObject.name || apiObject.canonical_alias || _t("Unnamed Room"),
|
||||
name: apiObject.name,
|
||||
roomId: apiObject.room_id,
|
||||
canonicalAlias: apiObject.canonical_alias,
|
||||
|
||||
Reference in New Issue
Block a user