Fix MessageLogger edit Timestamp component
This commit is contained in:
parent
48822bdc58
commit
46ee193cd0
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue