Don't crash when thread starter is deleted. (#449)

This commit is contained in:
Etorix 2025-10-10 18:27:47 -07:00 • committed by GitHub
parent fa44f8fccd
commit c6ebd58ff3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -208,7 +208,7 @@ export default definePlugin({
} else {
const isMessage = ["MESSAGE", "THREAD_STARTER_MESSAGE"].includes(item.type);
const message = (isMessage && (isThreadStarter ? actualStarterMessage : item.content)) || null;
const shouldKeep = !isMessage || this.shouldKeepMessage(message)[0];
const shouldKeep = !isMessage || !message || this.shouldKeepMessage(message)[0];
shouldKeep && newChannelStream.push(item);
}
});