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:
parent
bd270b08df
commit
f92f7beb47
15 changed files with 4 additions and 202 deletions
|
@ -30,13 +30,11 @@ import dis from './dispatcher/dispatcher';
|
|||
import { Action } from './dispatcher/actions';
|
||||
import { ViewUserPayload } from './dispatcher/payloads/ViewUserPayload';
|
||||
import { ViewRoomPayload } from "./dispatcher/payloads/ViewRoomPayload";
|
||||
import { showGroupReplacedWithSpacesDialog } from "./group_helpers";
|
||||
|
||||
export enum Type {
|
||||
URL = "url",
|
||||
UserId = "userid",
|
||||
RoomAlias = "roomalias",
|
||||
GroupId = "groupid",
|
||||
}
|
||||
|
||||
// Linkify stuff doesn't type scanner/parser/utils properly :/
|
||||
|
@ -115,11 +113,6 @@ function onUserClick(event: MouseEvent, userId: string) {
|
|||
});
|
||||
}
|
||||
|
||||
function onGroupClick(event: MouseEvent, groupId: string) {
|
||||
event.preventDefault();
|
||||
showGroupReplacedWithSpacesDialog(groupId);
|
||||
}
|
||||
|
||||
function onAliasClick(event: MouseEvent, roomAlias: string) {
|
||||
event.preventDefault();
|
||||
dis.dispatch<ViewRoomPayload>({
|
||||
|
@ -192,15 +185,6 @@ export const options = {
|
|||
onAliasClick(e, alias);
|
||||
},
|
||||
};
|
||||
|
||||
case Type.GroupId:
|
||||
return {
|
||||
// @ts-ignore see https://linkify.js.org/docs/options.html
|
||||
click: function(e: MouseEvent) {
|
||||
const groupId = parsePermalink(href).groupId;
|
||||
onGroupClick(e, groupId);
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -208,7 +192,6 @@ export const options = {
|
|||
switch (type) {
|
||||
case Type.RoomAlias:
|
||||
case Type.UserId:
|
||||
case Type.GroupId:
|
||||
default: {
|
||||
return tryTransformEntityToPermalink(href);
|
||||
}
|
||||
|
@ -255,17 +238,6 @@ registerPlugin(Type.RoomAlias, ({ scanner, parser, utils }) => {
|
|||
});
|
||||
});
|
||||
|
||||
registerPlugin(Type.GroupId, ({ scanner, parser, utils }) => {
|
||||
const token = scanner.tokens.PLUS as '+';
|
||||
matrixOpaqueIdLinkifyParser({
|
||||
scanner,
|
||||
parser,
|
||||
utils,
|
||||
token,
|
||||
name: Type.GroupId,
|
||||
});
|
||||
});
|
||||
|
||||
registerPlugin(Type.UserId, ({ scanner, parser, utils }) => {
|
||||
const token = scanner.tokens.AT as '@';
|
||||
matrixOpaqueIdLinkifyParser({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue