Skip to content

Commit

Permalink
Fix VoiceActivity DMs disappearing
Browse files Browse the repository at this point in the history
- fixes #75
  • Loading branch information
Neodymium7 committed Dec 16, 2024
1 parent 68e36c7 commit 5891177
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions VoiceActivity/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ export default class VoiceActivity {

patchPrivateChannel() {
const patchType = (props, ret) => {
if (props.channel.type !== 1) return ret;
if (props.channel.type !== 1) return;

const children = ret.props.children;
ret.props.children = (childrenProps) => {
// Plugin compatibility fix
let target = ret;
if (typeof target.props.children != "function") target = ret.props.children;

const children = target.props.children;
target.props.children = (childrenProps) => {
const childrenRet = children(childrenProps);

const privateChannel = Utils.findInTree(childrenRet, (e) => e?.children?.props?.avatar, {
Expand Down
4 changes: 2 additions & 2 deletions VoiceActivity/src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "VoiceActivity",
"author": "Neodymium",
"version": "1.9.1",
"version": "1.9.2",
"description": "Shows icons and info in popouts, the member list, and more when someone is in a voice channel.",
"source": "https://github.com/Neodymium7/BetterDiscordStuff/blob/main/VoiceActivity/VoiceActivity.plugin.js",
"invite": "fRbsqH87Av",
"changelog": [
{
"title": "Fixed",
"type": "fixed",
"items": ["Updated patching methods for improved plugin compatibility."]
"items": ["Fixed DMs disappearing when enabled with PlatformIndicators."]
}
]
}

0 comments on commit 5891177

Please sign in to comment.