KeywordNotify: Revert some changes

This commit is contained in:
thororen1234 2026-01-27 12:07:21 -05:00
parent b7f6e23fff
commit b13b351dfb
No known key found for this signature in database

View file

@ -392,7 +392,7 @@ export default definePlugin({
let listed = entry.listIds.some(id => id.trim() === m.channel_id || id === m.author.id);
if (!listed) {
const channel = ChannelStore.getChannel(m.channel_id);
if (channel !== null) {
if (channel != null) {
listed = entry.listIds.some(id => id.trim() === channel.guild_id);
}
}
@ -418,7 +418,7 @@ export default definePlugin({
if (safeMatchesRegex(embed.description, entry.regex, flags) || safeMatchesRegex(embed.title, entry.regex, flags)) {
matches = true;
break;
} else if (embed.fields !== null) {
} else if (embed.fields != null) {
for (const field of embed.fields as Array<{ name: string, value: string; }>) {
if (safeMatchesRegex(field.value, entry.regex, flags) || safeMatchesRegex(field.name, entry.regex, flags)) {
matches = true;