Automaitcally copy invite information

This commit is contained in:
Jorik Schellekens
2020-09-10 11:52:13 +01:00
parent 154f82f7d4
commit 4921513e13
4 changed files with 23 additions and 1 deletions
+11
View File
@@ -57,6 +57,17 @@ const Weechat: TextClient = {
return <span>Weechat doesn't support this kind of link</span>;
}
},
copyString: (link) => {
switch (link.kind) {
case LinkKind.Alias:
case LinkKind.RoomId:
return `/join ${link.identifier}`;
case LinkKind.UserId:
return `/invite ${link.identifier}`;
default:
return '';
}
},
description: 'Commandline Matrix interface using Weechat',
};
+1
View File
@@ -81,6 +81,7 @@ export interface LinkedClient extends ClientDescription {
export interface TextClient extends ClientDescription {
kind: ClientKind.TEXT_CLIENT;
toInviteString(parsedLink: SafeLink): JSX.Element;
copyString(parsedLink: SafeLink): string;
}
/*