ValidUser: fix rendering old mentions when message is edited

Fixes https://github.com/Vendicated/Vencord/issues/2451
main
Vendicated 4 months ago
parent 1f1c80c5f3
commit f6765818d2
No known key found for this signature in database
GPG Key ID: D66986BAF75ECF18

@ -83,7 +83,7 @@ export default definePlugin({
// Rendering
{
match: /"renderRow",(\i)=>{(?<="renderDM",.+?(\i\.default),\{channel:.+?)/,
replace: "$&if($self.isChannelIndex($1.section, $1.row))return $self.renderChannel($1.section,$1.row,$2);"
replace: "$&if($self.isChannelIndex($1.section, $1.row))return $self.renderChannel($1.section,$1.row,$2)();"
},
{
match: /"renderSection",(\i)=>{/,

@ -23,7 +23,7 @@ import { sleep } from "@utils/misc";
import { Queue } from "@utils/Queue";
import definePlugin from "@utils/types";
import { Constants, FluxDispatcher, RestAPI, UserProfileStore, UserStore, useState } from "@webpack/common";
import type { ComponentType, ReactNode } from "react";
import { type ComponentType, type ReactNode } from "react";
// LYING to the type checker here
const UserFlags = Constants.UserFlags as Record<string, number>;
@ -205,6 +205,7 @@ export default definePlugin({
return (
<ErrorBoundary noop>
<MentionWrapper
key={"mention" + data.userId}
RoleMention={RoleMention}
UserMention={UserMention}
data={data}

Loading…
Cancel
Save