diff --git a/src/plugins/_core/supportHelper.tsx b/src/plugins/_core/supportHelper.tsx index 432896fc7..d0ebdb33a 100644 --- a/src/plugins/_core/supportHelper.tsx +++ b/src/plugins/_core/supportHelper.tsx @@ -149,8 +149,8 @@ export default definePlugin({ patches: [{ find: ".BEGINNING_DM.format", replacement: { - match: /BEGINNING_DM\.format\(\{.+?\}\),(?=.{0,100}userId:(\i\.getRecipientId\(\)))/, - replace: "$& $self.ContributorDmWarningCard({ userId: $1 })," + match: /BEGINNING_DM\.format\(\{.+?\}\),(?=.{0,300}(\i)\.isMultiUserDM)/, + replace: "$& $self.renderContributorDmWarningCard({ channel: $1 })," } }], @@ -235,7 +235,8 @@ export default definePlugin({ } }, - ContributorDmWarningCard: ErrorBoundary.wrap(({ userId }) => { + renderContributorDmWarningCard: ErrorBoundary.wrap(({ channel }) => { + const userId = channel.getRecipientId(); if (!isPluginDev(userId)) return null; if (RelationshipStore.isFriend(userId) || isPluginDev(UserStore.getCurrentUser()?.id)) return null;