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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/handler.js +9 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thelounge-plugin-ntfy",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "A plugin for The Lounge that sends push notifications via ntfy when highlighted",
5
5
  "keywords": [
6
6
  "thelounge",
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((chan) => chan.name === data.target);
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(`Payload: ${JSON.stringify(data)}`);
46
- PluginLogger.debug(`Channels: ${JSON.stringify(network.channels)}`);
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");