thelounge-plugin-ntfy 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/config.js +1 -1
- package/src/handler.js +11 -1
package/package.json
CHANGED
package/src/config.js
CHANGED
package/src/handler.js
CHANGED
|
@@ -10,11 +10,21 @@ function createHandler(client, network) {
|
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
const isPM = data.target === network.nick;
|
|
14
|
+
|
|
15
|
+
const channel = isPM
|
|
16
|
+
? network.channels.find((chan) => chan.name === data.nick)
|
|
17
|
+
: network.channels.find((chan) => chan.name === data.target);
|
|
18
|
+
|
|
19
|
+
if (channel.muted) {
|
|
20
|
+
// Ignore messages in muted channels
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
const highlightRegex = new RegExp(network.highlightRegex, "i");
|
|
14
25
|
const message = data.message || "";
|
|
15
26
|
|
|
16
27
|
const mentioned = highlightRegex.test(message);
|
|
17
|
-
const isPM = data.target === network.nick;
|
|
18
28
|
|
|
19
29
|
let notify = false;
|
|
20
30
|
let userConfig;
|