thelounge-plugin-ntfy 1.7.2 → 1.7.3
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/handler.js +9 -3
package/package.json
CHANGED
package/src/handler.js
CHANGED
|
@@ -25,7 +25,9 @@ function createHandler(client, network) {
|
|
|
25
25
|
|
|
26
26
|
const channel = isPM
|
|
27
27
|
? network.channels.find((chan) => chan.name === data.nick)
|
|
28
|
-
: network.channels.find(
|
|
28
|
+
: network.channels.find(
|
|
29
|
+
(chan) => chan.name === data.target.toLowerCase(),
|
|
30
|
+
);
|
|
29
31
|
|
|
30
32
|
if (channel && channel.muted) {
|
|
31
33
|
// Ignore messages in muted channels
|
|
@@ -42,8 +44,12 @@ function createHandler(client, network) {
|
|
|
42
44
|
PluginLogger.error(
|
|
43
45
|
`Failed to construct channel URL for notification: ${error.message}`,
|
|
44
46
|
);
|
|
45
|
-
PluginLogger.debug(
|
|
46
|
-
|
|
47
|
+
PluginLogger.debug(
|
|
48
|
+
`Payload: ${JSON.stringify({ ...data, message: "[REDACTED]" })}`,
|
|
49
|
+
);
|
|
50
|
+
PluginLogger.debug(
|
|
51
|
+
`Channels: ${JSON.stringify(network.channels.map(({ messages, ...rest }) => rest))}`,
|
|
52
|
+
);
|
|
47
53
|
}
|
|
48
54
|
|
|
49
55
|
const highlightRegex = new RegExp(network.highlightRegex, "i");
|