From 59902a3729b06219fcc182f871efe66cde6255e0 Mon Sep 17 00:00:00 2001 From: camila314 <47485054+camila314@users.noreply.github.com> Date: Sat, 25 Nov 2023 17:13:19 -0600 Subject: [PATCH] no more mapMangledModule --- src/plugins/keywordNotify/index.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/keywordNotify/index.tsx b/src/plugins/keywordNotify/index.tsx index 4133ffe5c..d4bcbb2ba 100644 --- a/src/plugins/keywordNotify/index.tsx +++ b/src/plugins/keywordNotify/index.tsx @@ -21,7 +21,7 @@ const MenuHeader = findByCodeLazy("useInDesktopNotificationCenterExperiment)("); const Popout = findByPropsLazy("ItemsPopout"); const popoutClasses = findByPropsLazy("recentMentionsPopout"); const MessageObject = findByCodeLazy("}isFirstMessageInForumPost"); -const createMessageRecord = mapMangledModuleLazy("createMessageRecord:", {fn: filters.byCode("MessageTypes.THREAD_CREATED")}) +const createMessageRecord = findByPropsLazy("createMessageRecord", "updateMessageRecord"); async function setRegexes(idx: number, reg: string) { @@ -182,10 +182,10 @@ export default definePlugin({ }, addToLog(m) { - if (this.keywordLog.some((e) => e.id == m.id)) + if (m == null || this.keywordLog.some((e) => e.id == m.id)) return; - let thing = createMessageRecord.fn(m); + let thing = createMessageRecord.createMessageRecord(m); this.keywordLog.push(thing); this.keywordLog.sort((a, b) => b.timestamp - a.timestamp); @@ -225,7 +225,6 @@ export default definePlugin({ }; let messageRender = (e, t) => { - console.log("Message: ", e.content); let msg = this.renderMsg({ message: e, gotoMessage: t,