Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
d1bbb62058
1 changed files with 2 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ const saveHiddenMessages = (ids: Set<string>) => set(KEY, [...ids]);
|
|||
|
||||
migratePluginSettings("HideMedia", "HideAttachments");
|
||||
|
||||
const hasMedia = (msg: Message) => msg.attachments.length > 0 || msg.embeds.length > 0 || msg.stickerItems.length > 0;
|
||||
const hasMedia = (msg: Message) => msg.attachments.length > 0 || msg.embeds.length > 0 || msg.stickerItems.length > 0 || msg.components.length > 0;
|
||||
|
||||
async function toggleHide(channelId: string, messageId: string) {
|
||||
const ids = await getHiddenMessages();
|
||||
|
|
@ -62,7 +62,7 @@ export default definePlugin({
|
|||
patches: [{
|
||||
find: "this.renderAttachments(",
|
||||
replacement: {
|
||||
match: /(?<=\i=)this\.render(?:Attachments|Embeds|StickersAccessories)\((\i)\)/g,
|
||||
match: /(?<=\i=)this\.render(?:Attachments|Embeds|StickersAccessories|ComponentAccessories)\((\i)\)/g,
|
||||
replace: "$self.shouldHide($1?.id)?null:$&"
|
||||
}
|
||||
}],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue