Migrate Spam to new Plugin structure
This commit is contained in:
parent
140ba84544
commit
4f831f6bf6
14 changed files with 622 additions and 0 deletions
7
backend/src/plugins/Spam/util/clearRecentUserActions.ts
Normal file
7
backend/src/plugins/Spam/util/clearRecentUserActions.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { RecentActionType } from "../types";
|
||||
|
||||
export function clearRecentUserActions(pluginData, type: RecentActionType, userId: string, actionGroupId: string) {
|
||||
pluginData.state.recentActions = pluginData.state.recentActions.filter(action => {
|
||||
return action.type !== type || action.userId !== userId || action.actionGroupId !== actionGroupId;
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue