From 8113ed3c8cbc8894607b7d4ed6d5bb770f1a345e Mon Sep 17 00:00:00 2001
From: Vendicated <vendicated@riseup.net>
Date: Sat, 7 Jan 2023 03:19:28 +0100
Subject: Fix canary

---
 src/plugins/messageLinkEmbeds.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/plugins/messageLinkEmbeds.tsx')

diff --git a/src/plugins/messageLinkEmbeds.tsx b/src/plugins/messageLinkEmbeds.tsx
index f57b5d0..bcd2fa4 100644
--- a/src/plugins/messageLinkEmbeds.tsx
+++ b/src/plugins/messageLinkEmbeds.tsx
@@ -44,7 +44,7 @@ let AutomodEmbed: React.ComponentType<any>,
     Endpoints: Record<string, any>;
 
 waitFor(["mle_AutomodEmbed"], m => (AutomodEmbed = m.mle_AutomodEmbed));
-waitFor(filters.byCode("().inlineMediaEmbed"), m => Embed = m);
+waitFor(filters.byCode(".inlineMediaEmbed"), m => Embed = m);
 waitFor(m => m.type?.toString()?.includes('["message","compact","className",'), m => ChannelMessage = m);
 waitFor(["MESSAGE_CREATE_ATTACHMENT_UPLOAD"], _ => Endpoints = _);
 const SearchResultClasses = findByPropsLazy("message", "searchResult");
@@ -146,12 +146,12 @@ export default definePlugin({
     dependencies: ["MessageAccessoriesAPI"],
     patches: [
         {
-            find: "().embedCard",
+            find: ".embedCard",
             replacement: [{
                 match: /{"use strict";(.{0,10})\(\)=>(.{1,2})}\);/,
                 replace: '{"use strict";$1()=>$2,me:()=>messageEmbed});'
             }, {
-                match: /function (.{1,2})\((.{1,2})\){var (.{1,2})=.{1,2}\.message,(.{1,2})=.{1,2}\.channel(.{0,300})\(\)\.embedCard(.{0,500})}\)}/,
+                match: /function (.{1,2})\((.{1,2})\){var (.{1,2})=.{1,2}\.message,(.{1,2})=.{1,2}\.channel(.{0,300})\.embedCard(.{0,500})}\)}/,
                 replace: "function $1($2){var $3=$2.message,$4=$2.channel$5().embedCard$6})}\
 var messageEmbed={mle_AutomodEmbed:$1};"
             }]
-- 
cgit 

