Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wont-stream committed Sep 23, 2024
1 parent 64891f2 commit b47ef34
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
7 changes: 1 addition & 6 deletions plugins/eurotilities/modules/noReplyMention.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
const { flux } = shelter;
const { intercept } = flux;

// biome-ignore lint/complexity/noBannedTypes: N/A
let unintercept: Function | null = null;

export default {
title: "No Reply Mention",
content: "Disable replies by default.",
start: () => {
unintercept = intercept((dispatch) => {
intercept((dispatch) => {
if (dispatch.type !== "CREATE_PENDING_REPLY") return;

dispatch.shouldMention = false;
});

return true;
},
};
2 changes: 0 additions & 2 deletions plugins/eurotilities/modules/noTyping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ export default {
start: () => {
// @ts-ignore
intercept("post", /.*typing$/, () => {});

return true;
},
};
7 changes: 1 addition & 6 deletions plugins/eurotilities/modules/timestampedFiles.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
const { flux } = shelter;
const { intercept } = flux;

// biome-ignore lint/complexity/noBannedTypes: N/A
let unintercept: Function | null = null;

export default {
title: "Timestamped Files",
content: "Rename uploaded files to the current timestamp.",
start: () => {
unintercept = intercept((dispatch) => {
intercept((dispatch) => {
if (dispatch?.type === "UPLOAD_ATTACHMENT_ADD_FILES") {
for (const { file } of dispatch?.files ?? []) {
if (!file?.name) continue;
Expand All @@ -26,7 +23,5 @@ export default {
return dispatch;
}
});

return true;
},
};

0 comments on commit b47ef34

Please sign in to comment.