Fix MessageLogger edit Timestamp component

This commit is contained in:
Nuckyz 2024-02-14 15:07:51 -03:00
parent 48822bdc58
commit 46ee193cd0
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -26,7 +26,7 @@ import { Devs } from "@utils/constants";
import { Logger } from "@utils/Logger"; import { Logger } from "@utils/Logger";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { findByPropsLazy } from "@webpack"; import { findByPropsLazy } from "@webpack";
import { ChannelStore, FluxDispatcher, i18n, Menu, moment, Parser, Timestamp, UserStore } from "@webpack/common"; import { ChannelStore, FluxDispatcher, i18n, Menu, Parser, Timestamp, UserStore } from "@webpack/common";
import overlayStyle from "./deleteStyleOverlay.css?managed"; import overlayStyle from "./deleteStyleOverlay.css?managed";
import textStyle from "./deleteStyleText.css?managed"; import textStyle from "./deleteStyleText.css?managed";
@ -122,7 +122,7 @@ export default definePlugin({
makeEdit(newMessage: any, oldMessage: any): any { makeEdit(newMessage: any, oldMessage: any): any {
return { return {
timestamp: moment?.call(newMessage.edited_timestamp), timestamp: new Date(newMessage.edited_timestamp),
content: oldMessage.content content: oldMessage.content
}; };
}, },