feat: remove messagefix

was causing issues with freemoji plugin
This commit is contained in:
kmmiio99o 2026-05-07 13:32:11 +02:00
parent af64cda7fb
commit 752d1c9b11
No known key found for this signature in database
GPG key ID: AC9D7747D423B9BF
2 changed files with 0 additions and 59 deletions

View file

@ -34,7 +34,6 @@ export const getCorePlugins = (): CorePluginRecord => ({
"bunny.quickinstall": makeLazyPlugin(() => require("./quickinstall"), true),
"bunny.badges": makeLazyPlugin(() => require("./badges")),
"bunny.notrack": makeLazyPlugin(() => require("./notrack")),
"bunny.messagefix": makeLazyPlugin(() => require("./messagefix")),
"bunny.fixembed": makeLazyPlugin(() => require("./fixembed")),
});

View file

@ -1,58 +0,0 @@
import { defineCorePlugin } from "..";
import { findByProps } from "@metro";
import { logger } from "@lib/utils/logger";
// Find the MessageActions module
const MessageActions = findByProps("sendMessage");
let originalSendMessage: Function;
export default defineCorePlugin({
manifest: {
id: "bunny.messagefix",
version: "1.0.0",
type: "plugin",
spec: 3,
main: "",
display: {
name: "MessageFix",
description: "Ensures messages include the required nonce parameter",
authors: [{ name: "Win8.1VMUser (plugin by ShiggyCord Team)" }],
},
},
start() {
// Save original function
originalSendMessage = MessageActions.sendMessage;
// Replace with our implementation
MessageActions.sendMessage = function (
channelId: unknown,
message: unknown,
replyRef: unknown,
options: Record<string, unknown>,
) {
// Ensure options exists and has a nonce
options = options || {};
if (!options.nonce) {
options.nonce = (BigInt(Date.now() - 1420070400000) << 22n).toString();
}
// Call original with fixed parameters
return (originalSendMessage as Function).call(
this,
channelId,
message,
replyRef,
options,
);
};
logger.log("MessageFix: Enabled - adding nonce to all messages");
},
stop() {
// Restore original function
if (originalSendMessage) MessageActions.sendMessage = originalSendMessage;
logger.log("MessageFix: Disabled");
},
});