ValidUser: fix rendering old mentions when message is edited
Fixes https://github.com/Vendicated/Vencord/issues/2451
This commit is contained in:
parent
1f1c80c5f3
commit
f6765818d2
2 changed files with 3 additions and 2 deletions
|
@ -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…
Reference in a new issue