mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-10 23:23:04 -04:00
Purge FullUserInChatbox For Merge
Added To Vencord
This commit is contained in:
parent
920fad43e1
commit
276a53169a
2 changed files with 1 additions and 40 deletions
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2024 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
|
||||
const NormalMessageComponent = findComponentByCodeLazy(".USER_MENTION)");
|
||||
|
||||
export default definePlugin({
|
||||
name: "FullUserInChatbox",
|
||||
description: "Puts the full user mention object in the chatbox",
|
||||
authors: [Devs.sadan],
|
||||
|
||||
patches: [
|
||||
{
|
||||
find: "#{intl::UNKNOWN_ROLE_PLACEHOLDER})]",
|
||||
replacement: {
|
||||
match: /(hidePersonalInformation.*?)return/,
|
||||
replace: "$1return $self.patchChatboxMention(arguments[0]);"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
patchChatboxMention(props: any) {
|
||||
return <NormalMessageComponent
|
||||
// this seems to be constant
|
||||
className="mention"
|
||||
userId={props.id}
|
||||
channelId={props.channelId}
|
||||
// this seems to always be false/undef
|
||||
inlinePreview={undefined}
|
||||
/>;
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue