stuff
This commit is contained in:
parent
730a4ca26c
commit
f591355821
|
@ -7359,7 +7359,15 @@ module.exports = (_ => {
|
|||
|
||||
let MessageHeaderExport = BDFDB.ModuleUtils.findByProperties("MessageTimestamp", false);
|
||||
InternalBDFDB.processMessage = function (e) {
|
||||
if (e.instance.props.message) e.returnvalue.props["user_by_BDFDB"] = e.instance.props.message.author.id;
|
||||
if (MessageHeaderExport && BDFDB.ObjectUtils.get(e, "instance.props.childrenHeader.type.type.name") && BDFDB.ObjectUtils.get(e, "instance.props.childrenHeader.props.message")) e.instance.props.childrenHeader.type = MessageHeaderExport.exports.default;
|
||||
if (e.returnvalue && e.returnvalue.props && e.returnvalue.props.children && e.returnvalue.props.children.props) {
|
||||
let message;
|
||||
for (let key in e.instance.props) {
|
||||
if (!message) message = BDFDB.ObjectUtils.get(e.instance.props[key], "props.message");
|
||||
else break;
|
||||
}
|
||||
if (message) e.returnvalue.props.children.props["user_by_BDFDB"] = message.author.id;
|
||||
}
|
||||
};
|
||||
|
||||
const BDFDB_Patrons = Object.assign({}, InternalData.BDFDB_Patrons);
|
||||
|
|
|
@ -167,6 +167,7 @@
|
|||
"Channels": {"class": "guildchannels"},
|
||||
"ChannelTextAreaForm": {"class": "chatform"},
|
||||
"ChannelWindow": {"class": "chatcontent"},
|
||||
"ChatMessage": {"strings": ["childrenMessageContent", "childrenRepliedMessage", "message.id"]},
|
||||
"CustomStatusModal": {"class": "customstatusmodal"},
|
||||
"DirectMessage": {"class": "guildouter"},
|
||||
"EmojiPicker": {"strings": ["allowManagedEmojis", "EMOJI_PICKER_TAB_PANEL_ID", "diversitySelector"]},
|
||||
|
@ -188,7 +189,7 @@
|
|||
"InviteGuildName": {"props": ["GuildName", "GuildTemplateName"]},
|
||||
"InviteCard": {"class": "guildsettingsinvitecard"},
|
||||
"MemberCard": {"class": "guildsettingsmembercard"},
|
||||
"Message": {"strings": ["childrenMessageContent", "childrenRepliedMessage", "message.id"]},
|
||||
"Message": {"strings": ["childrenMessageContent", "childrenRepliedMessage", "zalgo"]},
|
||||
"MessageHeader": {"props": ["MessageTimestamp"]},
|
||||
"Messages": {"strings": ["group-spacing-", "canManageMessages"]},
|
||||
"MessageUsername": {"strings": ["default.username", "colorString", "compact"]},
|
||||
|
|
|
@ -81,7 +81,6 @@ module.exports = (_ => {
|
|||
|
||||
this.patchedModules = {
|
||||
before: {
|
||||
Message: "type",
|
||||
ReactorsComponent: "render",
|
||||
ChannelMembers: "render",
|
||||
PrivateChannelRecipients: "default",
|
||||
|
@ -95,6 +94,7 @@ module.exports = (_ => {
|
|||
ChannelPins: "default",
|
||||
RecentMentions: "default",
|
||||
Messages: "type",
|
||||
Message: "type",
|
||||
Reactions: "render",
|
||||
MemberListItem: "render",
|
||||
VoiceUser: "render",
|
||||
|
@ -234,9 +234,9 @@ module.exports = (_ => {
|
|||
|
||||
processMessage (e) {
|
||||
if (settings.removeReplies) {
|
||||
let repliedMessage = e.instance.props.childrenRepliedMessage;
|
||||
let repliedMessage = e.returnvalue.props.childrenRepliedMessage;
|
||||
if (repliedMessage && repliedMessage.props && repliedMessage.props.children && repliedMessage.props.children.props && repliedMessage.props.children.props.referencedMessage && repliedMessage.props.children.props.referencedMessage.message && repliedMessage.props.children.props.referencedMessage.message.author && BDFDB.LibraryModules.FriendUtils.isBlocked(repliedMessage.props.children.props.referencedMessage.message.author.id)) {
|
||||
delete e.instance.props.childrenRepliedMessage;
|
||||
delete e.returnvalue.props.childrenRepliedMessage;
|
||||
let header = e.instance.props.childrenHeader;
|
||||
if (header && header.props) {
|
||||
delete header.props.referencedMessage;
|
||||
|
|
Loading…
Reference in New Issue