Delete the remainder of groups (#9357)

* Delete the remainder of groups

Fixes https://github.com/vector-im/element-web/issues/22770
Continues https://github.com/matrix-org/matrix-react-sdk/pull/8027

* Don't need the strings either
This commit is contained in:
Travis Ralston
2022-10-05 17:44:46 +00:00
committed by GitHub
parent bd270b08df
commit f92f7beb47
15 changed files with 4 additions and 202 deletions
@@ -43,17 +43,11 @@ export default class ElementPermalinkConstructor extends PermalinkConstructor {
return `${this.elementUrl}/#/user/${userId}`;
}
forGroup(groupId: string): string {
return `${this.elementUrl}/#/group/${groupId}`;
}
forEntity(entityId: string): string {
if (entityId[0] === '!' || entityId[0] === '#') {
return this.forRoom(entityId);
} else if (entityId[0] === '@') {
return this.forUser(entityId);
} else if (entityId[0] === '+') {
return this.forGroup(entityId);
} else throw new Error("Unrecognized entity");
}
@@ -107,8 +101,6 @@ export default class ElementPermalinkConstructor extends PermalinkConstructor {
const eventId = parts.length > 2 ? parts.slice(2).join('/') : "";
const via = query.split(/&?via=/).filter(p => !!p);
return PermalinkParts.forEvent(entity, eventId, via);
} else if (entityType === 'group') {
return PermalinkParts.forGroup(entity);
} else {
throw new Error("Unknown entity type in permalink");
}