From c560aefe6ac940267be20c29171775c8e9eacb8c Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Sun, 29 Nov 2020 21:41:24 +0200 Subject: [PATCH] add full ids to message --- irc/plugin.ts | 12 ++++++++++++ tslint.json | 33 +-------------------------------- 2 files changed, 13 insertions(+), 32 deletions(-) diff --git a/irc/plugin.ts b/irc/plugin.ts index 5590467..610a7c4 100644 --- a/irc/plugin.ts +++ b/irc/plugin.ts @@ -28,6 +28,18 @@ class IRCMessage implements IMessage { public target?: IMessageTarget, public guest = true) {} + public get fullSenderID(): string { + return this.source.fullName + '/' + this.sender.id; + } + + public get fullRoomID(): string { + if (!this.target) { + return this.source.fullName; + } + + return this.source.fullName + '/' + this.target.id; + } + public resolve(...args: any[]): void { this.resolved = true; this.source.resolve(this, ...args); diff --git a/tslint.json b/tslint.json index a7b6db5..87fa89d 100644 --- a/tslint.json +++ b/tslint.json @@ -14,10 +14,6 @@ "severity": "warning" }, "eofline": true, - "import-blacklist": [ - true, - "rxjs/Rx" - ], "import-spacing": true, "indent": { "options": [ @@ -121,33 +117,6 @@ "check-type", "check-typecast" ] - }, - "component-class-suffix": true, - "contextual-lifecycle": true, - "directive-class-suffix": true, - "no-conflicting-lifecycle": true, - "no-host-metadata-property": true, - "no-input-rename": true, - "no-inputs-metadata-property": true, - "no-output-native": true, - "no-output-on-prefix": true, - "no-output-rename": true, - "no-outputs-metadata-property": true, - "template-banana-in-box": true, - "template-no-negated-async": true, - "use-lifecycle-interface": true, - "use-pipe-transform-interface": true, - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ] + } } }