aboutsummaryrefslogtreecommitdiff
path: root/src/utils/discord.ts
diff options
context:
space:
mode:
authorKareem Olim <kareemolim@gmail.com>2022-11-19 15:54:48 +0200
committerGitHub <noreply@github.com>2022-11-19 14:54:48 +0100
commit5ce2dc1bb4ee93f7e5121f684f957eb99ead22b8 (patch)
tree657d497442011f600ce1d67f9fad2442bb213832 /src/utils/discord.ts
parent8f2c247f27ad097352904de2bd1035b270315375 (diff)
downloadVencord-5ce2dc1bb4ee93f7e5121f684f957eb99ead22b8.tar.gz
Vencord-5ce2dc1bb4ee93f7e5121f684f957eb99ead22b8.tar.bz2
Vencord-5ce2dc1bb4ee93f7e5121f684f957eb99ead22b8.zip
feat(plugin): Read all notifications button (#217)
Co-authored-by: Ven <vendicated@riseup.net>
Diffstat (limited to 'src/utils/discord.ts')
-rw-r--r--src/utils/discord.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils/discord.ts b/src/utils/discord.ts
index 75fb079..7fc5064 100644
--- a/src/utils/discord.ts
+++ b/src/utils/discord.ts
@@ -18,7 +18,7 @@
import { Guild } from "discord-types/general";
-import { ChannelStore, GuildStore,SelectedChannelStore } from "../webpack/common";
+import { ChannelStore, GuildStore, PrivateChannelsStore, SelectedChannelStore } from "../webpack/common";
export function getCurrentChannel() {
return ChannelStore.getChannel(SelectedChannelStore.getChannelId());
@@ -27,3 +27,7 @@ export function getCurrentChannel() {
export function getCurrentGuild(): Guild | undefined {
return GuildStore.getGuild(getCurrentChannel()?.guild_id);
}
+
+export function openPrivateChannel(userId: string) {
+ PrivateChannelsStore.openPrivateChannel(userId);
+}