mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 06:34:21 +00:00
fix extractTargetGroup typing
This commit is contained in:
parent
c3fc54e158
commit
5c8951ffc3
2 changed files with 7 additions and 3 deletions
|
@ -99,10 +99,10 @@ const input: PluginInputHandler = function (network, chan, cmd, args) {
|
|||
// being sent back to us.
|
||||
if (!network.irc.network.cap.isEnabled("echo-message")) {
|
||||
const parsedTarget = network.irc.network.extractTargetGroup(targetName);
|
||||
let targetGroup;
|
||||
let targetGroup: string | undefined = undefined;
|
||||
|
||||
if (parsedTarget) {
|
||||
targetName = parsedTarget.target as string;
|
||||
targetName = parsedTarget.target;
|
||||
targetGroup = parsedTarget.target_group;
|
||||
}
|
||||
|
||||
|
|
6
server/types/modules/irc-framework.d.ts
vendored
6
server/types/modules/irc-framework.d.ts
vendored
|
@ -117,7 +117,11 @@ declare module "irc-framework" {
|
|||
isEnabled: (cap: string) => boolean;
|
||||
enabled: string[];
|
||||
};
|
||||
extractTargetGroup: (target: string) => any;
|
||||
extractTargetGroup: (target: string) => {
|
||||
target: string;
|
||||
target_group: string;
|
||||
};
|
||||
|
||||
supports(feature: "MODES"): string;
|
||||
supports(feature: string): boolean;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue