Skip to content

Commit

Permalink
mediaTweaks: No Sticker Autosend
Browse files Browse the repository at this point in the history
  • Loading branch information
Cynosphere committed Jan 7, 2025
1 parent bbfc539 commit 6dc9978
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/mediaTweaks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ export const patches: Patch[] = [
match: /if\((.)\.sourceWidth<.\.targetWidth\){/,
replacement: (orig, props) => `require("mediaTweaks_imagePropsProcessor").default(${props});${orig}`
}
},

// No Sticker Autosend
{
find: ',"chat input type must be set");',
replace: {
match: /(?<=!.&&\()(\(0,.\..{1,2}\)\(.+?\.drafts\.type\))\?/,
replacement: (_, orig) => `((moonlight.getConfigOption("mediaTweaks","noStickerAutosend")??true)?true:${orig})?`
}
}
];

Expand Down
7 changes: 6 additions & 1 deletion src/mediaTweaks/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://moonlight-mod.github.io/manifest.schema.json",
"id": "mediaTweaks",
"version": "1.0.6",
"version": "1.0.7",
"meta": {
"name": "Media Tweaks",
"tagline": "Various tweaks to images and videos. Every feature togglable.",
Expand Down Expand Up @@ -58,6 +58,11 @@
"description": "Removes size parameters from thumbnails. **This will cause your client to freeze in channels with lots of high resolution images in them**",
"type": "boolean",
"default": false
},
"noStickerAutosend": {
"displayName": "No Sticker Autosend",
"type": "boolean",
"default": true
}
},
"apiLevel": 2
Expand Down

0 comments on commit 6dc9978

Please sign in to comment.