Fix VoiceButtons Open DM (#1127)
* Fix VoiceButtons DM opening * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
824ac7df21
commit
8486c9807e
1 changed files with 2 additions and 3 deletions
|
|
@ -8,7 +8,7 @@ import "./styles.css";
|
|||
|
||||
import { Icon, User } from "@vencord/discord-types";
|
||||
import { findComponentByCodeLazy, findStoreLazy } from "@webpack";
|
||||
import { Button, ChannelStore, GuildActions, MediaEngineStore, NavigationRouter, PermissionsBits, PermissionStore, Tooltip, UserStore, VoiceActions, VoiceStateStore } from "@webpack/common";
|
||||
import { Button, ChannelActionCreators, ChannelStore, GuildActions, MediaEngineStore, NavigationRouter, PermissionsBits, PermissionStore, Tooltip, UserStore, VoiceActions, VoiceStateStore } from "@webpack/common";
|
||||
import { JSX } from "react";
|
||||
|
||||
import { settings } from "./settings";
|
||||
|
|
@ -96,8 +96,7 @@ export function UserChatButton({ user }: { user: User; }) {
|
|||
NavigationRouter.transitionTo("/users/@me/");
|
||||
return;
|
||||
}
|
||||
const chanId = ChannelStore.getDMFromUserId(user.id);
|
||||
NavigationRouter.transitionTo(`/channels/@me/${chanId}/`);
|
||||
ChannelActionCreators.openPrivateChannel({ recipientIds: [user.id], navigateToChannel: true });
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue