+24
-8
public/docs/notifications.md
+24
-8
public/docs/notifications.md
···
56
56
<br />
57
57
<br />
58
58
59
-
For every service, you can take advantage of a regex to blacklist posts:
60
-
- `^\[live\]` will not post anything starting with `[live]`.
61
-
- `insult|badword` will not post anything that includes either `insult` or `badword`.
62
-
- `^(?!support$).+$` will only post that are `support`. (useful for Reddit flairs)
63
-
<br />
59
+
For **every service**, you can take advantage of a regex to whitelist and blacklist posts.
64
60
<br />
65
61
66
62
You can use [regexr.com](https://regexr.com/) or [ChatGPT](https://chatgpt.com/) to create (JavaScript-like) regexs.
67
-
Keep in mind that the regex is inverted, meaning, everything that matches the regex will be ignored.
68
-
You can use a negative lookahead to negate the condition, in order to create a whitelist filter.
69
-
The flags used for string matching are `gi`, only the YouTube and Twitch titles, Bluesky post bodies, and Reddit flairs are checked.
63
+
<br />
64
+
<br />
65
+
66
+
The following values are matched against:
67
+
- YouTube titles
68
+
- Twitch titles and game name*
69
+
- Bluesky post bodies
70
+
- Reddit post title and flair*
71
+
72
+
*In case of a Whitelist, it's enough for one of the values to match. In case of a Blacklist, no value must match the regex.
73
+
<br />
74
+
<br />
75
+
76
+
**Whitelist examples**
77
+
- `^\[live\]` will only post anything starting with `[live]`.
78
+
- `Grand Theft Auto` will only post anything that includes `Grand Theft Auto`. (useful for Twitch games)
79
+
<br />
80
+
<br />
81
+
82
+
**Blacklist examples**
83
+
- `^\[live\]` will not post anything starting with `[live]`.
84
+
- `insult|badword` will not post anything that includes either `insult` or `badword`.
85
+
- `^(?!support$).+$` will only post that are `support`. (useful for Reddit flairs)
70
86
71
87
### 🕵️♀️ Styles (whitelabel / webhook)
72
88
Notification styles allow you to customize (or whitelabel) the username and avatar of the author (i.e. the sender of the message) separately for each notification. Wamellow will automatically manage the webhooks for you.
+5
-4
typings.ts
+5
-4
typings.ts
···
414
414
Reddit = 3
415
415
}
416
416
417
+
export enum NotificationFlags {
418
+
DeleteAfterStream = 1 << 4,
419
+
MustNotMatchRegex = 1 << 8
420
+
}
421
+
417
422
export enum BlueskyNotificationFlags {
418
423
SendReposts = 1 << 0,
419
424
SendReplies = 1 << 1,
420
425
SendQuotes = 1 << 2,
421
426
MustContainImage = 1 << 3
422
-
}
423
-
424
-
export enum TwitchNotificationFlags {
425
-
DeleteAfterStream = 1 << 4
426
427
}
427
428
428
429
export enum YoutubeNotificationFlags {