aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/invisibleChat/index.tsx
diff options
context:
space:
mode:
authorNuckyz <61953774+Nuckyz@users.noreply.github.com>2023-05-11 14:44:33 -0300
committerGitHub <noreply@github.com>2023-05-11 17:44:33 +0000
commit0c54b1fa1d8f9d858baf912bb4b1efd9d3c0ec93 (patch)
treefb26b3fcbb27b50b351b2fecb160108a9dd6feb0 /src/plugins/invisibleChat/index.tsx
parent393f76749a77998497466b284414f15ac9ad4135 (diff)
downloadVencord-0c54b1fa1d8f9d858baf912bb4b1efd9d3c0ec93.tar.gz
Vencord-0c54b1fa1d8f9d858baf912bb4b1efd9d3c0ec93.tar.bz2
Vencord-0c54b1fa1d8f9d858baf912bb4b1efd9d3c0ec93.zip
[skip ci] Fix InvisibleChat button being added to wrong chat box (#1100)
Diffstat (limited to 'src/plugins/invisibleChat/index.tsx')
-rw-r--r--src/plugins/invisibleChat/index.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/invisibleChat/index.tsx b/src/plugins/invisibleChat/index.tsx
index feae548..fb173ee 100644
--- a/src/plugins/invisibleChat/index.tsx
+++ b/src/plugins/invisibleChat/index.tsx
@@ -64,7 +64,13 @@ function Indicator() {
}
-function ChatBarIcon() {
+function ChatBarIcon(chatBoxProps: {
+ type: {
+ analyticsName: string;
+ };
+}) {
+ if (chatBoxProps.type.analyticsName !== "normal") return null;
+
return (
<Tooltip text="Encrypt Message">
{({ onMouseEnter, onMouseLeave }) => (
@@ -133,7 +139,7 @@ export default definePlugin({
find: ".activeCommandOption",
replacement: {
match: /(.)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,
- replace: "$&;try{$2||$1.push($self.chatBarIcon())}catch{}",
+ replace: "$&;try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}",
}
},
],