aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorNico <nico@d3sox.me>2022-12-16 15:51:23 +0100
committerGitHub <noreply@github.com>2022-12-16 15:51:23 +0100
commit3efc79224fd96f6c8b92a31197afe45e9937dd6c (patch)
tree6850a5b0016e3f6dc5286e90fb924371a94124b4 /src/plugins
parent456164253d21beac703426d07bc6c7906cc3f4d4 (diff)
downloadVencord-3efc79224fd96f6c8b92a31197afe45e9937dd6c.tar.gz
Vencord-3efc79224fd96f6c8b92a31197afe45e9937dd6c.tar.bz2
Vencord-3efc79224fd96f6c8b92a31197afe45e9937dd6c.zip
[ShowHiddenChannels] Fix last message date (#342)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/showHiddenChannels.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/showHiddenChannels.tsx b/src/plugins/showHiddenChannels.tsx
index 70b8406..7f52635 100644
--- a/src/plugins/showHiddenChannels.tsx
+++ b/src/plugins/showHiddenChannels.tsx
@@ -23,7 +23,7 @@ import { Devs } from "@utils/constants";
import { ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
import definePlugin, { OptionType } from "@utils/types";
import { waitFor } from "@webpack";
-import { Button, ChannelStore, Text } from "@webpack/common";
+import { Button, ChannelStore, SnowflakeUtils, Text } from "@webpack/common";
const CONNECT = 1048576n;
const VIEW_CHANNEL = 1024n;
@@ -117,7 +117,7 @@ export default definePlugin({
const isHidden = this.isHiddenChannel(channel);
// check for type again, otherwise it would show it for hidden stage channels
if (channel.type === 0 && isHidden) {
- const lastMessageDate = channel.lastActiveTimestamp ? new Date(channel.lastActiveTimestamp).toLocaleString() : null;
+ const lastMessageDate = channel.lastMessageId ? new Date(SnowflakeUtils.extractTimestamp(channel.lastMessageId)).toLocaleString() : null;
openModal(modalProps => (
<ModalRoot size={ModalSize.SMALL} {...modalProps}>
<ModalHeader>